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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AutoRefresh in Lookup Field

Status
Not open for further replies.

MChancellor

Technical User
Jan 12, 2000
35
0
0
US
Is it possible to do an autorefresh of a lookup field? Let me attempt to explain what I am trying to do:

I have 3 forms.

Contract Form
Company Form
Contact Form

I have a lookup field on the Contract form that allows the user to look up the Federal ID # for the company. If the Federal Id # is not in the lookup field, I have a button that the user can press to open the Company Form and add the Company information to the Company table. However, I need a way to refresh the lookup list, so that whenever the Company form is closed, and the user again looks at the list, the company will be there.

First of all, is it possible to do this?

If so, how?

Thanks in advance,
M Chancellor
 
In the OnClose event property of the form that is opened to add the record put the following:

On Error Resume Next 'this will avoid any error messages if the other form isn't open

Forms!FormNameWithControlToRefresh!ControlToRefresh.Requery
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top