Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not in list event glitch

Status
Not open for further replies.

EvilCabal

Programmer
Jul 11, 2002
206
CA
Hey, I have a combo box witch contain some dates. It has 2 columns, the first one contains only date while the second one (invisible) contains the date with 2 other numbers (this one is stored in a table while the first one is not).

Sample :
1st column : 02/03/04 (only shown in combo box, not stored)
2nd column : 020304xx (stored in a table, xx are the 2 control diggits)

What I need to do is when the user type in a date that is not in the table (therefore not in the list), I fill in the 2 control diggits and append the date to the table. Then requery the combo box so that the process is completely invisible to the user, but the only place I can do this is on the Not in list event and it doesn't work. It gives me the following error :

You must save the current field before you run the requery action.

I also tried to add it with Response = acDataErrorAdded (after adding the date to the table) but it just won't work. Please help I'm running out of ideas...
 
I don't believe you need to requery the combobox. The command - Response = acDataErrorAdded should take care of it.
 
No it doesn't work, that's where my problem started. Since the combo box is bound to a table you cannot add data to it with acDataErrAdded. I've redone the whole thing in another way to go around the problem but if anyone has an idea I'd still like to hear it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top