Printing report from form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to print a report based on details in the form. For example, I have
created my own employee report that should print a particular employee
details in the form by pressing print button in the form.
 
Hi Buthy,

You can use the Where clause of the OpenReport action to
limit the report

ie:

this would go in the OnClick event of your button]

DoCmd.OpenReport "Reportname", acPreview, , _
"EmployeeID=" & nz(me.EmployeeID)

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com
 
Hi Crystal,

I have tried that and its working fine, but when I press the printpreview
button it asks for employee no parameter. Is it possible to not have
parameter window showing?
--
My Regards,
Buthy


Crystal said:
Hi Buthy,

You can use the Where clause of the OpenReport action to
limit the report

ie:

this would go in the OnClick event of your button]

DoCmd.OpenReport "Reportname", acPreview, , _
"EmployeeID=" & nz(me.EmployeeID)

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com


I want to print a report based on details in the form. For example, I have
created my own employee report that should print a particular employee
details in the form by pressing print button in the form.
 
Buthy said:
Hi Crystal,

I have tried that and its working fine, but when I press the
printpreview button it asks for employee no parameter. Is it possible
to not have parameter window showing?

Crystal used EmployeeID in her code as an *example*. You have to replace
EmployeeID with whatever field name you are actually using. If you did that
then getting a prompt indicates that you spelled something wrong.
 
Hi,

I really need help, I have tried many ways but still it's asking for promt?
What to Do?
 
Hi Buthy,

please post the code you are using to open the report

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access
strive4peace2006 at yahoo.com
 
Back
Top