Set Focus on Navigation Form (1 Viewer)

Wysy

Registered User.
Local time
Today, 07:10
Joined
Jul 5, 2015
Messages
333
Hi,
I have a Navigation Form with 3 navigation buttons. I use this navigation form to present data of a table
I have a pop up form where i can enter data to that table. Upon closing that pop up form i would like to see the updated data in the navigation form. I found that if i put manually the focus on the navigation form and press refresh everything shows up. However i can not find the way how to setfocus on the navigation form upon closing the pop up form. So i understand navigation form has navigation subforms that holds the form showing the data of table.
i have tried the following
Forms![Navigation Form]!NavigationSubform.Form!NavHorse.setfocus
NavHorse is the name of the form showing up in the navigation form.
thanks
Andrew
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:10
Joined
May 7, 2009
Messages
19,246
it would be on your pop-up form close event:

Forms![Navigation Form]!NavigationButtonX.SetFocus
SendKeys "{Enter}"
 

Wysy

Registered User.
Local time
Today, 07:10
Joined
Jul 5, 2015
Messages
333
Thank you! It worked perfectly exactly the way i wanted.
 

moke123

AWF VIP
Local time
Today, 10:10
Joined
Jan 11, 2013
Messages
3,935
Another option would be a public function or sub within the navigation form. they can be tricky and i would use the allForms collection to test if the form is loaded. then you can call the sub with something like

Form_frmName.PublicSubName(anyVars)

Sendkeys can be equally tricky and i usually try to avoid them.
 

Users who are viewing this thread

Top Bottom