requery problem

richard luft

Registered User.
Local time
Today, 15:05
Joined
Jun 4, 2004
Messages
63
Hi;
I'm trying to use code to follow up a 'notinlist' event for a combobx field on a form. This code works perfectly in Access2, but I'm trying to upgrade to Access2000, and this same code is failing, with errmsg of :
"You must save the current field before you run the requery action"

The code which is failing in Ac2k is the following, which is for the field in which the 'notinlist' event occurred.

Private Sub SelectInsco_GotFocus()
Me![SelectInsco].Requery
Me![SelectInsco].Dropdown
End Sub

I note that my form where the new info is placed is already closed when this event occurs, so the record in question should already be' saved'. Is there something that I'm missing?
Is there an Ac2k equivalent of the domenuitem/save record action in Ac2 that would solve my problem?

TIA, Richard
 
This is just a wild stab in the dark here, but should you be using "AfterUpdate" rather than "GotFocus"?
 
I'm not sure, but my combobox should need its underlying query updated before the cb can even show the new data item (I think). Anyhow, the code I shoewed worked fine in Ac2.
 

Users who are viewing this thread

Back
Top Bottom