Printing only the selected

J

Jesse

I have a form that contains data that my staff needs to
print. When they enter the information they print up a
receipt. Is there a way to create a short cut or change
the defalt on the print menu so that when they go to print
that it only prints the current record and not all of the
forms. I know you can select it in the print menu but when
my staff forgets to select "Print selected records" they
print 500 reciepts. Any suggestions? Please help if you
can.
 
F

fredg

Jesse said:
I have a form that contains data that my staff needs to
print. When they enter the information they print up a
receipt. Is there a way to create a short cut or change
the defalt on the print menu so that when they go to print
that it only prints the current record and not all of the
forms. I know you can select it in the print menu but when
my staff forgets to select "Print selected records" they
print 500 reciepts. Any suggestions? Please help if you
can.
Jesse,
As this is a Report's newsgroup, I'll assume that when you write
'that it only prints the current record and not all of the forms. '
what you mean is Reports, not forms.

Your table should have a unique prime key field.

Add a command button to the form.

Code it's click event:

DoCmd.RunCommand acCmdSaveRecord
DoCmd.OpenReport "ReportName", , , "[RecordID] = " & [RecordID]

Where [RecordID] is the name of the prime key field.
The above assumes [RecordID] is a Number datatype.
If [RecordID] is Text datatype, use:
"[RecordID] = '" & [RecordID] & "'"
 
J

John

Jesse, Some of my users wanted the same thing. And that
is print only the one record showing in the user form. If
they select print, all the records associated with the
form will print. The following is what I use to limit the
printing (from a button on the form) of only the one
record showing on the form.

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.PrintOut acSelection

Hope this info helps.
*** John
 

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