Updating Form Data

MikeEller

Registered User.
Local time
Today, 16:04
Joined
Jan 7, 2005
Messages
32
Hello,

I have a form that is just for viewing data from tables.
I have two other forms that edit that data. They are opened with click events from the original form.
How do I have the main form update the data when I close an edit form?

It will work "out of the box" if I am editing data. But if I am adding a new record or adding data that was not filled in previously, it does not get updated unless I close the form and re-open it.

Thanks,
Mike
 
In the on Close Event of the Edit or Add form
Set the focus to your viewing form and requery

Forms![yourformname].SetFocus
Forms![yourformname].Requery

Hope this helps?
 
That worked...Thanks
 

Users who are viewing this thread

Back
Top Bottom