Vassago
Former Staff Turned AWF Retiree
- Local time
- Today, 18:09
- Joined
- Dec 26, 2002
- Messages
- 4,696
I keep Access minimized until a report is open. When a report is open, I run the following code:
DoCmd.RunCommand acCmdAppMaximize
DoCmd.Close acForm, "frm_onlinereports"
DoCmd.OpenReport "report1", acViewPreview
All works fine. Access maximizes to allow my report to be shown with my custom toolbar. The problem lies in minimizing access when the report is closed. I run the following code:
DoCmd.ShowToolbar "ReportView", acToolbarNo
DoCmd.RunCommand acCmdAppMinimize
DoCmd.OpenForm "frm_onlinereports"
I get an error at acCmdAppMinimize. The error says."The command is not available now. Why not? Am I doing something wrong? I've tried what I can think of. Any ideas?
Thanks!
Vassago
DoCmd.RunCommand acCmdAppMaximize
DoCmd.Close acForm, "frm_onlinereports"
DoCmd.OpenReport "report1", acViewPreview
All works fine. Access maximizes to allow my report to be shown with my custom toolbar. The problem lies in minimizing access when the report is closed. I run the following code:
DoCmd.ShowToolbar "ReportView", acToolbarNo
DoCmd.RunCommand acCmdAppMinimize
DoCmd.OpenForm "frm_onlinereports"
I get an error at acCmdAppMinimize. The error says."The command is not available now. Why not? Am I doing something wrong? I've tried what I can think of. Any ideas?
Thanks!
Vassago