Solved What event is this? (1 Viewer)

mistyinca1970

Member
Local time
Today, 04:07
Joined
Mar 17, 2021
Messages
117
I have this scenario in several forms in my DB: clicking a button will open a pop-up form that will update a record. When the pop-up form is closed, I would like to refresh the main form, but I don't know which event that is. So currently, I have a button I manually click to refresh.

Can anyone tell me what event this would be? Thanks!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:07
Joined
Oct 29, 2018
Messages
21,357
Hi. You could open the popup forms in dialog mode and then refresh the form. The refresh won't happen until the user close the popup form.
 

Minty

AWF VIP
Local time
Today, 11:07
Joined
Jul 26, 2013
Messages
10,354
If your pop up form is opened as a Modal/Dialog the code in the calling form is halted until the pop up is closed.
So, you can simply add the Me.Requery after the DoCmd.OpenForm
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:07
Joined
Feb 28, 2001
Messages
26,996
If the pop-up ISN'T Modal/Dialog, look to the Enter event on the form from which the pop-up was triggered. "Enter" and "Exit" are paired events for when you enter or leave the form's "sphere of control."
 

mistyinca1970

Member
Local time
Today, 04:07
Joined
Mar 17, 2021
Messages
117
If your pop up form is opened as a Modal/Dialog the code in the calling form is halted until the pop up is closed.
So, you can simply add the Me.Requery after the DoCmd.OpenForm
OK, so in my click event that opens the form, just add this as a line item after the open form? I will try this and report back...

Thanks!
 

mistyinca1970

Member
Local time
Today, 04:07
Joined
Mar 17, 2021
Messages
117
OK this worked! Thank you all for the suggestions. Minty, I appreciate understanding what is happening (i.e. the original event being halted while the modal form is open). This gives me a bunch of ideas on how to manipulate the order of operations in some forms!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:07
Joined
Oct 29, 2018
Messages
21,357
OK this worked! Thank you all for the suggestions. Minty, I appreciate understanding what is happening (i.e. the original event being halted while the modal form is open). This gives me a bunch of ideas on how to manipulate the order of operations in some forms!
Hi. Glad to hear you got it sorted out. Good luck with your project.
 

Minty

AWF VIP
Local time
Today, 11:07
Joined
Jul 26, 2013
Messages
10,354
It's a very handy series of events for that type of processing.
Glad you have it fixed.
 

Users who are viewing this thread

Top Bottom