I have a form with a button to print another form. When I execute the following code, the database window unhides.
Dim stDocName As String
Dim MyForm As Form
stDocName = "frmPrintPictureLandscaspe"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
Why does it do this and how can I keep the database window hidden?
Thanks for any help,
Kopy
Dim stDocName As String
Dim MyForm As Form
stDocName = "frmPrintPictureLandscaspe"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
Why does it do this and how can I keep the database window hidden?
Thanks for any help,
Kopy