Printing only the selected

  • Thread starter Thread starter Jesse
  • Start date Start date
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.
 
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] & "'"
 
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
 
I can't say if you helped the original poster but you saved my .. ahem .. day

Thank you SO much!!
 
Back
Top