Requery form

B

BobC

I have a form (Form-A) that can be accessed from 2 forms within my
application (Master-1 or Master-2). That form has popup forms to perform a
series of actions. I need to requery Form-A after closing the popup form
which changes the data on Form-A.

I have tried doing a requery on several of the form event properties (On Get
Focus, On Current, etc) on Form-A without success. I think I need to do the
requery from the popup form but I don't know what the tree is for the correct
syntax:
Forms!Master-1!Form-A.requery or
Forms!Master-2!Form-A.requery

Any suggestions?
 
M

Mark A. Sam

Bob,

If you are opening the form in VBA code, open it in Dialog mode which will
stop processing until the popup form is closed. The next line should be
Me.Requery or Me.Refresh which will execute immediately after the popup is
closed.


DoCmd.OpenForm "SomePopupForm", , , , , acDialog
Me.Requery

Requerying will take you to the first record in the form, so you may want
Me.Refresh instead.

God Bless,

Mark A. Sam
 
B

BobC

Thank you. This solved my problem.

--
BobC



Mark A. Sam said:
Bob,

If you are opening the form in VBA code, open it in Dialog mode which will
stop processing until the popup form is closed. The next line should be
Me.Requery or Me.Refresh which will execute immediately after the popup is
closed.


DoCmd.OpenForm "SomePopupForm", , , , , acDialog
Me.Requery

Requerying will take you to the first record in the form, so you may want
Me.Refresh instead.

God Bless,

Mark A. Sam
 

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