Print Report from Form

E

eb1mom

I have a form for daily production data entry.It is laid
out well for data entry but, not for printing. I created a
report with same information for printing. I would like to
put a command button on form to print the report. How can I
get the command button to only print the report for the
form that is open? Thanks
 
D

David French

You have already created the report so all you need to do is create a macro
to make it print.
There is a macro command PrintOut.
Configure and save the macro so IT works.
Then create a command button on the form that refers to the macro and you're
set!

Dave French
Office XP Master Instructor
 
M

Marshall Barton

eb1mom said:
I have a form for daily production data entry.It is laid
out well for data entry but, not for printing. I created a
report with same information for printing. I would like to
put a command button on form to print the report. How can I
get the command button to only print the report for the
form that is open?


The command button wizard will generate the code to print
the report. To restrict the report to just the form's
current record, modify the code so that it looks like:

stCriteria = "thekeyfield = " & Me.txtthekeyfield
DoCmd.OpenReport stDocName, , , stCriteria

Change all the names I used to the ones in your code and
form.
 
D

David French

Which method worked for you?
And don't just say mine because I asked.
I may be certified (or is that certifiable) as an Access expert...but most
that have above average knowledge could pass that test.
I'm always learning something new!

Dave
 

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

Top