D
DesiGuju2004
Guest
Does anyone knows what's going on here ?
I have combo box on my main form and i'm using following code to add new record to combo box. Each time i add new record it adds to the table twice. For example if i put "XYZ" in combo box it would add new value to the combo box but when i go back in the table to see the value i will see XYZ twice as two different record.
I have combo box on my main form and i'm using following code to add new record to combo box. Each time i add new record it adds to the table twice. For example if i put "XYZ" in combo box it would add new value to the combo box but when i go back in the table to see the value i will see XYZ twice as two different record.
Code:
Private Sub cboSAENo_NotInList(NewData As String, Response As Integer)
Dim strsql
MsgBox "This SAE No does not exist. Creating new Record."
strsql = "Insert Into tblSAEs (SAENo, ParticipantsNo) values ('" & NewData & "','" & Me.cboParticipants & "')"
CurrentDb.Execute strsql ', dbForwardOnly
Response = acDataErrAdded
End Sub