refresh not working

Graham Bucknall

Registered User.
Local time
Today, 07:55
Joined
Feb 28, 2002
Messages
28
I have a form to list businesses. There is a button which starts an "add business" form but when I add a new business and save it does not appear on the original form. I have to shut down the form and restart it -refresh doesn't work.

The original form is a tabbed form with firm details on tab 1 and workers on tab 2.
 
If you do a refresh on a control, it will redraw it, but it won't requery the underlying source that feeds into it. Try using an expression like this:
Me.lstBox.Requery
 
Last edited:
Where does this go? (Sorry - bit of a novice)
 
In the Close event of the Add new business form, check to make sure the user hasn't cancelled out of adding a new business (in that case, you wouldn't need to refresh or requery anything), use some code like this:
Forms!frmOriginalForm!lstBox.Requery
where you should substitute the name of the "original" form for frmOriginal, and the name of your control listing companies for lstbox.

If you're not sure how to add code to the Close event of your Add new business form, look in the Access help.
 

Users who are viewing this thread

Back
Top Bottom