M
mark_jm via AccessMonster.com
I am printing out a form. Its a sub form on a parent form.
The code looks as below, but I want to add the code to print a title on the
print out. The title is a string value in a control on the main form. Can
this be done?
Private Sub Command11_Click()
On Error GoTo Err_Command11_Click
Dim stDocName As String
Dim MyForm As Form
stDocName = "quality meeting wcf list_subform"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.name, False
Exit_Command11_Click:
Exit Sub
Err_Command11_Click:
MsgBox err.Description
Resume Exit_Command11_Click
Many thanks Mark
End Sub
The code looks as below, but I want to add the code to print a title on the
print out. The title is a string value in a control on the main form. Can
this be done?
Private Sub Command11_Click()
On Error GoTo Err_Command11_Click
Dim stDocName As String
Dim MyForm As Form
stDocName = "quality meeting wcf list_subform"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.name, False
Exit_Command11_Click:
Exit Sub
Err_Command11_Click:
MsgBox err.Description
Resume Exit_Command11_Click
Many thanks Mark
End Sub