Print Report from Form

  • Thread starter Thread starter eb1mom
  • Start date Start date
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
 
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
 
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.
 
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
 
Back
Top