Refresh SubForm from Freestanding Form

G

Guest

I have a subform that is pulling data from a table. I've created a data
entry form to enter individual records and I've created a macro to dump the
data from the stand-alone form into the table. I'd like to have the subform
refreshed automatically when I close the Stand-Alone Form, but cannot do it
via the macro as the subform is fed directly from the table (not a query), so
I cannot use the requery.

Any suggestions? TIA
 
K

kingston via AccessMonster.com

Use the stand-alone form's On Close event and the following:

Forms!MainForm!SubForm.Requery

You might want to also check that the other form is open or just trap the
error if it isn't:

If CurrentProject.AllForms("MainForm").IsLoaded = False Then…
 

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