Click here to Skip to main content
16,020,447 members

Comments by Ali198324 (Top 8 by date)

Ali198324 25-Jan-21 14:29pm View    
Deleted
If the database is protected with a password, how can we add it in the connection code?
Ali198324 20-Jan-21 12:34pm View    
sir thank you!
Ali198324 20-Jan-21 12:05pm View    
Unable to cast object of type 'System.Windows.Forms.ComboBox' to type 'LodWin.Data_Entery'.
Ali198324 20-Jan-21 12:05pm View    
Deleted
Unable to cast object of type 'System.Windows.Forms.ComboBox' to type 'LodWin.Data_Entery'.
Ali198324 20-Jan-21 12:03pm View    
Why did this code not work?

For Each item As Data_Entery In GroupBox1.Controls

If item.Text = Nothing Then


MsgBox("يرجى تعبئة جميع البيانات")
cmM_H.Focus()
Exit Sub
Else

If MsgBox("هل تريد حفظ البيانات", MsgBoxStyle.OkCancel) = MsgBoxResult.Ok Then
Dim cmd As New OleDbCommand
cmd = New OleDbCommand("Insert Into Data_Entrey ([M_H],[MR_MS],[T_G],[Modil],[Compeny],[Many_Factor],[SN],[NO],[Date],[GH_DE],[Po],[Notes]) values ('" & TextBox1.Text & "','" & TextBox2.Text & "','" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text & "','" & TextBox8.Text & "', #" & DateTimePicker1.Text & "# ,'" & TextBox9.Text & "','" & TextBox10.Text & "','" & TextBox11.Text & "')", con)
con.Open()
cmd.ExecuteNonQuery()
con.Close()
btnSave.Enabled = False
btnNew.Enabled = True
GroupBox1.Enabled = False
Button1.Focus()

End If
End If
Next