How to print report from Form database

richardplr

Registered User.
Local time
Tomorrow, 03:38
Joined
Jun 10, 2003
Messages
239
Hi,

I have a form and on my form, I have a button for printing .

I want to set it that when I click the printing button, it will only print the report that appear on the form not all

I have attached my demo for your advise.

Thank you
:confused: :confused:
 

Attachments

Richardplr,

Something like this:

DoCmd.OpenReport stDocName, acNormal, , "[Ref No] = " & Me.[Ref No]

Wayne
 
WayneRyan said:
Richardplr,

Something like this:

DoCmd.OpenReport stDocName, acNormal, , "[Ref No] = " & Me.[Ref No]

Wayne


Thank you for your help..... ;)
 
follow up

I am working on the same thing, the only twist i have is that i need to apply a filter (e.g. ID #) on that report. How can I do it? Thanks
 
bb,

Richard is only printing out the [Ref No] that is currently on the form.
Just substitute the name of your Primary Key field [ID #] and it should
work.

Wayne
 
bbznyc said:
I am working on the same thing, the only twist i have is that i need to apply a filter (e.g. ID #) on that report. How can I do it? Thanks

Create a query and then under the field (ID #) set a criteria [ID #]. I think this will be done. So everytime, when you need to print, it will prompt you for ID #.

Please see my attachment. Hope I answered your question.
 

Attachments

  • Answer.gif
    Answer.gif
    6.4 KB · Views: 112
not really. I already have a report which lists everything as needed (for example where each employee worked). I want to have a preview/print button which will stay on the "order" form. Then as the name of the employee pops up during order i want to run the report but only for this employee. Thanks! :cool:
 
Thanks rich... it's just that i wanted to stay away from using the ID# :)
 

Users who are viewing this thread

Back
Top Bottom