Form not focused when opened

bd528

Registered User.
Local time
Today, 12:10
Joined
May 7, 2012
Messages
111
Hi,

I'm opening a form in VBA using the following :-

Code:
DoCmd.OpenForm "frmBrokerAcc", acNormal

The form opens, but focus remains on the original form.

I've tried setting focus to a control on the opened form :-

Code:
DoCmd.OpenForm "frmBrokerAcc", acNormal
DoCmd.SelectObject acForm, "frmBrokerAcc"
Forms!frmBrokerAcc.Command2.SetFocus

...but the problem remains.

Can anyone suggest a solution?
 

Users who are viewing this thread

Back
Top Bottom