Forum Discussion
Tony2021
Mar 16, 2022Steel Contributor
Open Form acDialog
Hello Experts, I have the below code firing on my main form. When the main form opens, the other forms in teh code open if Dcount>0. I have noticed that the forms open all at once and not on...
- Mar 17, 2022
actually there are Errors in your code!
did you disable error checking?
see your sample:
DoCmd.OpenForm "frmNotifications", WindowMode:=acDialog
did you noticed what is wrong?
if not then, here you define WindowMode:=acDialog, but, did you define the FormName?
should be:
DoCmd.OpenForm FormName:="frmNotifications", WindowMode:=acDialogfor the acFormDS form:
DoCmd.OpenForm FormName:="frmNotificationsDateCheck", View:=acFormDS, WindowMode:=acDialog
do it with the rest of your code.
George_Hepworth
Mar 16, 2022Silver Contributor
How about putting each succeeding Form open event on the close event of the previous form?
- Tony2021Mar 16, 2022Steel Contributorthat is a good idea. I didnt think of that. I would prefer to have all the code in the main form though.
- George_HepworthMar 16, 2022Silver ContributorAgreed, but sometimes plan B works when plan A, which would be more elegant doesn't.
I will take a look tomorrow, but I'm not confident you can control the opening of the downstream forms that way, although I agree that opening a form with the dialog mode is supposed to suspend processing of subsequent.- Tony2021Mar 16, 2022Steel ContributorOK. FYI: I do have the forms as pop up and modal. Let me know if you have any other ideas. thank you