L
LHEMA
For some odd reason my printview button on my form does not work, I get a
debug error telling me to check the macros...this is what I have for the code:
Private Sub Print_Preview_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[employeeID#] = """ & Me.[EmployeeID#] & """"
DoCmd.OpenReport "Employee Accidents", acViewPreview, , strWhere
End If
End Sub
Any help is appreciated, Thanks
debug error telling me to check the macros...this is what I have for the code:
Private Sub Print_Preview_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[employeeID#] = """ & Me.[EmployeeID#] & """"
DoCmd.OpenReport "Employee Accidents", acViewPreview, , strWhere
End If
End Sub
Any help is appreciated, Thanks