Refreshing data on a form

J

julie

I have a Find Record command button. When clicked it
brings up a parameter to find a customer's last name.
Then a replicate form opens up to that customer's last
name. I can add new records on the replicate form,
however when I click the close button and I am returned
to the original form (with the Find Record button) the
new data is not there until I close out of that form.
How do I refresh the data to be included on the original
form without closing out?...thanks!
 
M

Max Smart

If you open the replicate form as acDialog, code execution halts on the
calling form so you can call the Form.Requery method immediately after the
OpenForm line. The only problem is your replicate form will stay on top of
all other windows until closed (you'll have to close it if you open a report
from the replicate form).

If you want, you can also store the new record ID in a global variable
before closing the form and navigate to the newly created record in the
calling form.

Max
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top