OnNotInList error

CGC

Registered User.
Local time
Today, 12:56
Joined
Nov 12, 2001
Messages
12
I needed to be able to add a new record to a combo box. I just tried using the example in the Microsoft database (Q197526). It works up until the InputBox appears to add the new record. Then I get an error "Data Type mismatch in criteria expression". I think if figured out why, but I don't know what to do about it. In my table, the ID is a numeric field (AutoNumber) and in the example, the CustomerID is a text field. So the dbText in the BuildCriteria is probably causing this? But what do I enter in this line instead of dbText? Thank you to anyone that can help!
 
You cannot add to the Autonumber field as this is done automatically by Access. You would add another field (Customer Name perhaps) and Access will increment your ID field. You might want to look at the second method described in that same article. Or give us a few more details on what you want to add to the Combo box.
 
That got me going in the right direction. I found out the dbText s/b dbInteger and it seems to be working fine. Thanks for the info!
 

Users who are viewing this thread

Back
Top Bottom