L
LHEMA
I need help....when I click the print preview button on the form it goes
directly to the code page and display and error "DoCmd.OpenReport "rpt
Employee Accidents", acViewPreview, , strWhere"
It work before I do not know what is wrong any help is appreciated
Here is how the code looks:
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 "rpt Employee Accidents", acViewPreview, , strWhere
End If
End Sub
directly to the code page and display and error "DoCmd.OpenReport "rpt
Employee Accidents", acViewPreview, , strWhere"
It work before I do not know what is wrong any help is appreciated
Here is how the code looks:
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 "rpt Employee Accidents", acViewPreview, , strWhere
End If
End Sub