G
Gus Chuch
Hello Need Help Again
Trying to set up a combo box to add a new customer name, got this code from
the Access help. I get a SQL; error ?? Also I will need to add a new number
to my primary key field (this is set to auto number in the table)
Private Sub Customer_NotInList(NewData As String,Response As Integer)
Dim ctl As Control
Set ctl = Me!cboCustomer
If MsgBox("Value is not in list. Add it?", vbOKCancel) = vbOK Then
Response = acDataErrAdded
ctl.RowSource = ctl.RowSource & ";" & NewData
Else
Response = acDataErrContinue
ctl.Undo
End If
End Sub
Any ides?
Trying to set up a combo box to add a new customer name, got this code from
the Access help. I get a SQL; error ?? Also I will need to add a new number
to my primary key field (this is set to auto number in the table)
Private Sub Customer_NotInList(NewData As String,Response As Integer)
Dim ctl As Control
Set ctl = Me!cboCustomer
If MsgBox("Value is not in list. Add it?", vbOKCancel) = vbOK Then
Response = acDataErrAdded
ctl.RowSource = ctl.RowSource & ";" & NewData
Else
Response = acDataErrContinue
ctl.Undo
End If
End Sub
Any ides?