Hi guy i'm writing a program using vb the main page when the user choose in the combo box active = yes then insert into table1 then active=no then insert into table2
Here is my code please check for me why got error and correct me if i'm wrong
Private Sub cmdAdd_Click()
If cboActive.Value = True Then
cnUni.Execute "Insert into staff_badgeTrackingNew ( '" & txtID.Text & "','" & txtEmpID.Text & "','" & txtEmp_Name.Text & "'," & txtDepart.Text & "','" & cboActive.Value & "','" & cboStatus.Value & "','" & cboLoct.Value & "','" & cboCard.Value & "','" & txtApp.Text & "''" & txtCompany.Text & "')"
ClearAll
Else
cnUnisql.Execute "Insert into staff_badgeTracking( '" & txtID.Text & "','" & txtEmpID.Text & "','" & txtEmp_Name.Text & "'," & txtDepart.Text & "','" & cboActive.Value & "','" & cboStatus.Value & "','" & cboLoct.Value & "','" & cboCard.Value & "','" & txtApp.Text & "''" & txtCompany.Text & "')"
ClearAll
End If
Clear
End Sub