So i have a form with combo boxs,textboxes...and i want those values inserted in a table called "DEPENDENTS". here is the code i have, but its just not inserting the values...
Private Sub cmdAddDependent_Click()
Dim sSql As String
Dim dbThis As Database
'
Set dbThis = Access.CurrentDb
sSql = "INSERT INTO DEPENDENTS VALUES('" & cboAssociate2.Value & "','" & cboAssociate2.Value & "', '" & txtFirstName.Value & "', '" & txtLastName.Value & "', '" & txtB.Value & "'," & txtNumber.Value & ",15)"
dbThis.Execute sSql
End Sub
Private Sub cmdAddDependent_Click()
Dim sSql As String
Dim dbThis As Database
'
Set dbThis = Access.CurrentDb
sSql = "INSERT INTO DEPENDENTS VALUES('" & cboAssociate2.Value & "','" & cboAssociate2.Value & "', '" & txtFirstName.Value & "', '" & txtLastName.Value & "', '" & txtB.Value & "'," & txtNumber.Value & ",15)"
dbThis.Execute sSql
End Sub