So I have this form "frmMain3" that I am trying to get to open print preview with filters I have already applied when I click on a button "Print". Is there a way to do that? Here is my code so far:
I keep getting a Compile Error: Type mismatch
Code:
Private Sub Print_Click()
Dim myform As Form
Set myform = Screen.ActiveForm
DoCmd.SelectObject acForm, myform.Name, True
DoCmd.SelectObject myform, acPreview
DoCmd.SelectObject acForm, myform.Name, False
End Sub
I keep getting a Compile Error: Type mismatch