Refreshing a lookup list

StephenB

Registered User.
Local time
Today, 00:37
Joined
Apr 18, 2002
Messages
101
I have form A that has lookup field [Member]. If the member is not on the lookup list, the user will click on a command button that opens form B in which new members are entered. The member is entered and the form is closed focusing once again on form A.

My problem: Once form B is closed and the focus returns to form A, the new member is not displayed on the lookup list in the [members] field. I have to press F9 and refresh to have the new member displayed on the list.

I use "DoCmd.RunCommand acCmdSaveRecord" to refresh the form in another procedure. Is there something similar that will refresh the lookup list so that when I close form B, [members] automatically has the new member?

TIA
 
Hey Stephen,

What are you using for you "lookup" on Form A?

Maybe something that I could help you with is to tell you to play around with Form B On Close or On Exit properties. In one of these get Form B to requery the "lookup" in Form A.

For instance. If the lookup is a combo box then you could do code something like this:

Forms![FormA]![ComboBoxName].Requery

HTH
Shane
 
Yes, it's a combo box. Let me try the requery. I'm going to try in on the on_enter event of the lookup field. Thanks.

[This message has been edited by StephenB (edited 05-30-2002).]
 
Thanks, Shane. placing it on the on_enter of the lookup field locked up my field and I couldn't drop the list down. I placed it on the on_exit of the form B command button (since it defaults to that button when you close the form). Works great now.
Thanks again.
 

Users who are viewing this thread

Back
Top Bottom