WhiteZiggy
Programmer
OK, I have a combo box (cbo), that gets its values from a table/query. I want to add the entry to the table if its not there and then reset the drop down.
Here is what I have so far..
Private Sub cboVendorNames_NotInList(NewData As String, Response As Integer)
Dim strSQL As String
Dim dblVendorID As Double
dblVendorID = InputBox("Please enter vendor ID if known.", "Vendor ID", 0)
strSQL = "INSERT INTO tblVendorList ( VendorName, VendorID ) values ('" & NewData & "'," & dblVendorID & "
"
CurrentDb.Execute (strSQL)
DoEvents
end sub
This works except it doesnt requery the box.. It ALWAYS says...."The text you enterer is not in the list."
Why?
Suggestions?
Thanks,
WZ
Here is what I have so far..
Private Sub cboVendorNames_NotInList(NewData As String, Response As Integer)
Dim strSQL As String
Dim dblVendorID As Double
dblVendorID = InputBox("Please enter vendor ID if known.", "Vendor ID", 0)
strSQL = "INSERT INTO tblVendorList ( VendorName, VendorID ) values ('" & NewData & "'," & dblVendorID & "
CurrentDb.Execute (strSQL)
DoEvents
end sub
This works except it doesnt requery the box.. It ALWAYS says...."The text you enterer is not in the list."
Why?
Suggestions?
Thanks,
WZ