open multiple forms sequentially

  • Thread starter Cyberwolf via AccessMonster.com
  • Start date
C

Cyberwolf via AccessMonster.com

I have a form that could open 4 other forms. I want them to open
sequentially. i.e. frm 1 open, frm 1 close, frm2 open etc. I have the code
in the one form as such

DoCmd.OpenForm "2010BubbleSequenceDescsubform", acFormDS, , ,
acFormAdd, acDialog, stArgs
DoCmd.OpenForm "2020RulesTableDefinitionsubform", acFormDS, , ,
acFormAdd, acDialog, stArgs
DoCmd.OpenForm "2030ConfigItemRulesTableCRsubform", acFormDS, , ,
acFormAdd, acDialog, stArgs
DoCmd.OpenForm "2040RulesTableValueDefinitionsubform", acFormDS, ,
, acFormAdd, acDialog, stArgs

I would have thought that wiht the acDialog would have stop the execution
until the each form is closed, but htis is not the case. All 4 forms open at
the same time. I know I could just set the coding in each forms onClose
event, but these forms are used elsewhere. Any idea why the acdialog doesn't
work in this case?
 
J

Jeanette Cunningham

James,
the acDialog works from the users point of view. The user can't move to
another form till the acDialog form is closed, but that doesn't apply to vba
code.

Jeanette Cunningham
 
J

J_Goddard via AccessMonster.com

Hi

Sorry, Jeanette but I think you are mistaken - the purpose of the acDialog
mode is to do just what James wants - to stop code execution until a form
opened that way is closed. What you are describing is a Modal form.

James:

Usually this works; I tested it with some simple forms and it runs fine when
I *do not* use acFormDS. If I use acFormDS, I get exactly the behaviour you
describe, so the problem is with acFormDS, it seems.

I can't think of a workaround at the moment (it's 3:00 AM), but you might use
coding in the On Close events, together with the OpenArgs property, to
determine which form, if any, to open next.


John





Jeanette said:
James,
the acDialog works from the users point of view. The user can't move to
another form till the acDialog form is closed, but that doesn't apply to vba
code.

Jeanette Cunningham
I have a form that could open 4 other forms. I want them to open
sequentially. i.e. frm 1 open, frm 1 close, frm2 open etc. I have the
[quoted text clipped - 19 lines]
doesn't
work in this case?
 
C

Cyberwolf via AccessMonster.com

I did some experimenting myself and saw the same behavior you did. I ended
up doing exactly as you described to take care on my issue. This also had
the added benefit of appending to the OpenArgs statement on certain froms to
carry over some data.

Thanks,

J_Goddard said:
Hi

Sorry, Jeanette but I think you are mistaken - the purpose of the acDialog
mode is to do just what James wants - to stop code execution until a form
opened that way is closed. What you are describing is a Modal form.

James:

Usually this works; I tested it with some simple forms and it runs fine when
I *do not* use acFormDS. If I use acFormDS, I get exactly the behaviour you
describe, so the problem is with acFormDS, it seems.

I can't think of a workaround at the moment (it's 3:00 AM), but you might use
coding in the On Close events, together with the OpenArgs property, to
determine which form, if any, to open next.

John
James,
the acDialog works from the users point of view. The user can't move to
[quoted text clipped - 8 lines]
 

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