Print Preview error

G

Guest

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
 
G

Guest

What is the field type of employeeID#?

If its a number, try this
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

What is the error you are getting?
 
G

Guest

Yes it is a number field, I change the expression and it still do not work.
The message error I am recieving is a data type mismatch in criteria
expression. I have check everything and can not find it
--
LHEMA


Ofer said:
What is the field type of employeeID#?

If its a number, try this
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

What is the error you are getting?

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



LHEMA said:
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
 
G

Guest

Can you post the code you have now?



LHEMA said:
Yes it is a number field, I change the expression and it still do not work.
The message error I am recieving is a data type mismatch in criteria
expression. I have check everything and can not find it
--
LHEMA


Ofer said:
What is the field type of employeeID#?

If its a number, try this
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

What is the error you are getting?

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



LHEMA said:
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
 
G

Guest

Yes, heres the code I presently have:

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

--
LHEMA


Ofer said:
Can you post the code you have now?



LHEMA said:
Yes it is a number field, I change the expression and it still do not work.
The message error I am recieving is a data type mismatch in criteria
expression. I have check everything and can not find it
--
LHEMA


Ofer said:
What is the field type of employeeID#?

If its a number, try this
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

What is the error you are getting?

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



:

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
 
G

Guest

Try this

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


--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



LHEMA said:
Yes, heres the code I presently have:

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

--
LHEMA


Ofer said:
Can you post the code you have now?



LHEMA said:
Yes it is a number field, I change the expression and it still do not work.
The message error I am recieving is a data type mismatch in criteria
expression. I have check everything and can not find it
--
LHEMA


:

What is the field type of employeeID#?

If its a number, try this
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

What is the error you are getting?

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



:

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
 
G

Guest

Thank you so much it work....

Could you tell me what I did wrong so in the future I would know the
problem.Again Thank you
--
LHEMA


Ofer said:
Try this

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


--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



LHEMA said:
Yes, heres the code I presently have:

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

--
LHEMA


Ofer said:
Can you post the code you have now?



:

Yes it is a number field, I change the expression and it still do not work.
The message error I am recieving is a data type mismatch in criteria
expression. I have check everything and can not find it
--
LHEMA


:

What is the field type of employeeID#?

If its a number, try this
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

What is the error you are getting?

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



:

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
 
G

Guest

Thank you so much....it works!!!

Can you tell me what I was doing wrong so that if this happens again I would
know.Again Thanks for all your help
--
LHEMA


Ofer said:
Try this

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


--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



LHEMA said:
Yes, heres the code I presently have:

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

--
LHEMA


Ofer said:
Can you post the code you have now?



:

Yes it is a number field, I change the expression and it still do not work.
The message error I am recieving is a data type mismatch in criteria
expression. I have check everything and can not find it
--
LHEMA


:

What is the field type of employeeID#?

If its a number, try this
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

What is the error you are getting?

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



:

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
 
G

Guest

Thank you so much....it works!!!

Can you tell me what I was doing wrong so that if this happens again I would
know.Again Thanks for all your help
--
LHEMA


Ofer said:
Try this

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


--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



LHEMA said:
Yes, heres the code I presently have:

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

--
LHEMA


Ofer said:
Can you post the code you have now?



:

Yes it is a number field, I change the expression and it still do not work.
The message error I am recieving is a data type mismatch in criteria
expression. I have check everything and can not find it
--
LHEMA


:

What is the field type of employeeID#?

If its a number, try this
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

What is the error you are getting?

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



:

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
 
G

Guest

Thank you so much....it works!!!

Can you tell me what I was doing wrong so that if this happens again I would
know.Again Thanks for all your help

I am not sure if you are getting the post..my server keeps going down, sorry
for the duplicate replies
--
LHEMA


Ofer said:
Try this

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


--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



LHEMA said:
Yes, heres the code I presently have:

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

--
LHEMA


Ofer said:
Can you post the code you have now?



:

Yes it is a number field, I change the expression and it still do not work.
The message error I am recieving is a data type mismatch in criteria
expression. I have check everything and can not find it
--
LHEMA


:

What is the field type of employeeID#?

If its a number, try this
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

What is the error you are getting?

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



:

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
 
G

Guest

You assigned the WhereCondition as String, when the field type is actually a
number.

For future reference

For string use
strWhere = "[employeeID#] = """ & Me.[EmployeeID#] & """"
Or
strWhere = "[employeeID#] = '" & Me.[EmployeeID#] & "'"
============================================
For Number
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

============================================
For date
strWhere = "[employeeID#] = #" & Me.[EmployeeID#] & "#"

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



LHEMA said:
Thank you so much....it works!!!

Can you tell me what I was doing wrong so that if this happens again I would
know.Again Thanks for all your help

I am not sure if you are getting the post..my server keeps going down, sorry
for the duplicate replies
--
LHEMA


Ofer said:
Try this

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


--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



LHEMA said:
Yes, heres the code I presently have:

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

--
LHEMA


:

Can you post the code you have now?



:

Yes it is a number field, I change the expression and it still do not work.
The message error I am recieving is a data type mismatch in criteria
expression. I have check everything and can not find it
--
LHEMA


:

What is the field type of employeeID#?

If its a number, try this
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

What is the error you are getting?

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



:

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
 
G

Guest

Thank you again for helping me solve the problem
--
LHEMA


Ofer said:
You assigned the WhereCondition as String, when the field type is actually a
number.

For future reference

For string use
strWhere = "[employeeID#] = """ & Me.[EmployeeID#] & """"
Or
strWhere = "[employeeID#] = '" & Me.[EmployeeID#] & "'"
============================================
For Number
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

============================================
For date
strWhere = "[employeeID#] = #" & Me.[EmployeeID#] & "#"

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



LHEMA said:
Thank you so much....it works!!!

Can you tell me what I was doing wrong so that if this happens again I would
know.Again Thanks for all your help

I am not sure if you are getting the post..my server keeps going down, sorry
for the duplicate replies
--
LHEMA


Ofer said:
Try this

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


--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



:

Yes, heres the code I presently have:

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

--
LHEMA


:

Can you post the code you have now?



:

Yes it is a number field, I change the expression and it still do not work.
The message error I am recieving is a data type mismatch in criteria
expression. I have check everything and can not find it
--
LHEMA


:

What is the field type of employeeID#?

If its a number, try this
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

What is the error you are getting?

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



:

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
 
G

Guest

Your welcome, glad I could help


LHEMA said:
Thank you again for helping me solve the problem
--
LHEMA


Ofer said:
You assigned the WhereCondition as String, when the field type is actually a
number.

For future reference

For string use
strWhere = "[employeeID#] = """ & Me.[EmployeeID#] & """"
Or
strWhere = "[employeeID#] = '" & Me.[EmployeeID#] & "'"
============================================
For Number
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

============================================
For date
strWhere = "[employeeID#] = #" & Me.[EmployeeID#] & "#"

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



LHEMA said:
Thank you so much....it works!!!

Can you tell me what I was doing wrong so that if this happens again I would
know.Again Thanks for all your help

I am not sure if you are getting the post..my server keeps going down, sorry
for the duplicate replies
--
LHEMA


:

Try this

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


--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



:

Yes, heres the code I presently have:

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

--
LHEMA


:

Can you post the code you have now?



:

Yes it is a number field, I change the expression and it still do not work.
The message error I am recieving is a data type mismatch in criteria
expression. I have check everything and can not find it
--
LHEMA


:

What is the field type of employeeID#?

If its a number, try this
strWhere = "[employeeID#] = " & Me.[EmployeeID#]

What is the error you are getting?

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



:

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Printview - debug error 1
Print the record in the form 1
Printing Report 3
HELP with Print Current Record 2
Trouble with the following 4
Print multiple reports 6
Print Current Record 9
Print single report 8

Top