On my project, the main form "frmMain3" has 4 search boxes that can search 4 separate columns on the split form (since I couldn't set up one search box for the entire file but thats another issue). These search boxes are "Search_box", "Customer_Search", DivDir_Search" and "Project_Search" respectively. Once I search for something in a certain search box, it filters the form below based on what I typed in the box.
Now the issue, I want to have MS Access open a print preview screen (in landscape mode) when I click a button based on the filtered results of the search box. However, the best I've been able to generate is an unfiltered print preview screen. Any way to do this?
My code so far that now outputs a type mismatch error:
Now the issue, I want to have MS Access open a print preview screen (in landscape mode) when I click a button based on the filtered results of the search box. However, the best I've been able to generate is an unfiltered print preview screen. Any way to do this?
My code so far that now outputs a type mismatch error:
Code:
Private Sub Print_Click()
Dim myform As Form
Set myform = Screen.ActiveForm
DoCmd.SelectObject acForm, myform.Name, True
DoCmd.OpenForm frmMain3, acPreview
DoCmd.SelectObject acForm, myform.Name, False
End Sub