Hi all,
I have a table called Customers.
In a form I have a list with inputfield linked to this table.
If you type in a word in this list, and the word is not already in the table, is there a way to put it automaticly in the table?
If tried with the next code when 'If not in list' :
But this won't work
I have a table called Customers.
In a form I have a list with inputfield linked to this table.
If you type in a word in this list, and the word is not already in the table, is there a way to put it automaticly in the table?
If tried with the next code when 'If not in list' :
Code:
Private Sub Customer_NotInList(NewData As String, Response As Integer)
Dim dbs As Database, StrSQL As String
Set dbs = CurrentDb
DoCmd.RunSQL ("INSERT INTO Customer (Customer) VALUES (" & Customer.Value & ")")
End Sub
But this won't work