How to minimizing database window using code

ions

Access User
Local time
Today, 13:31
Joined
May 23, 2004
Messages
823
Dear Access Expert

when i run the two lines below

DoCmd.SelectObject acReport, stDocName, True
DoCmd.PrintOut acPrintAll, , , , 4

........... the database window (with the tables, queries, etc....) appears.

I don't want this behavior. How do I minimize this window using code?

Can I prevent it from popping up altogether?

Thank you
 
--- how about you delete one of your threads before we answer?
--- no need for a double post... especially in the same forum, same category, with the exact same wording (2 mins later)
 
Window

To hide the database window:

Private Sub cmdHide_Click()
DoCmd.SelectObject acTable, , True
DoCmd.RunCommand acCmdWindowHide
End Sub

To show the database window:

Private Sub cmdShow_Click()
DoCmd.SelectObject acTable, , True
DoCmd.SelectObject acForm, Me.Name
End Sub
 
Thank you Truck Time

It worked

Again Thank you for your help
 

Users who are viewing this thread

Back
Top Bottom