MsAccessNL
Member
- Local time
 - Today, 16:44
 
- Joined
 - Aug 27, 2022
 
- Messages
 - 219
 
When I run these two commands: "DoCmd.RunCommand acCmdLayoutView,     DoCmd.RunCommand acCmdFormView"  from a cmdButton on the mainform it will work but from a subform it doesn't. When I move the focus to another openform, the docmd works. My question is to remove the focus from the main form (if no other form is open). I was thinking about setting the focus to the Menubar or the applicationwindow? Or maybe another solution to have the DoCmd.RunCommand acCmdLayoutView work from a button on a subform?