Docmd.openform with/without acDialog strange behavior

Wysy

Registered User.
Local time
Today, 06:00
Joined
Jul 5, 2015
Messages
335
Hi, I am struggling with following which more a theoretical question, since some workaround i have found, but still would like to understand the "error".
I have frm1 with pop-up=yes with a cmd button to open frm2 that has pop-up=yes. Frm2 has a subform with fields. After opening frm2 the focus is supposed to be on frm2/subform. The situation is the following:
1. cmd button - docmd.openform "frm2" - frm2 opens without cursor on subform.
2. cmd button - docmd.openform "frm2",,,,,,,acdialog - frm2 opens with cursor on subform first field.

So the workaround is acDialog parameter, but why? The forms are a bit more complicated than this (more controls), but maybe someone has the fast answer since hours i can not figure out why is this.
thank you
 
What other commands do you have in the button after opening frm2?
 
Before opening i have a close form command for frm1
 
Thank you so much, now i understand it. So it means since multiple forms are open in dialog mode, it confuses the system so unless it is explicitly "re-commanded", it is not setting the focus to where i think it should.
 

Users who are viewing this thread

Back
Top Bottom