A
Antonio
I have a subform and I would like to print the customers'
data, but when I print, the form is actually printing, not
the data. Of course, I don't want to put actual data in
the code, so if anyone could help, it would be
appreciated. The code I have now (with data) is:
If O1062.Visible Then
stDocName = "O1062"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
ElseIf O1085.Visible Then
stDocName = "O1085"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
ElseIf O1057.Visible Then
stDocName = "O1057"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
ElseIf O1021.Visible Then
stDocName = "O1021"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
End If
data, but when I print, the form is actually printing, not
the data. Of course, I don't want to put actual data in
the code, so if anyone could help, it would be
appreciated. The code I have now (with data) is:
If O1062.Visible Then
stDocName = "O1062"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
ElseIf O1085.Visible Then
stDocName = "O1085"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
ElseIf O1057.Visible Then
stDocName = "O1057"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
ElseIf O1021.Visible Then
stDocName = "O1021"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False
End If