Printing record entered on form.

  • Thread starter Thread starter FLGuy
  • Start date Start date
F

FLGuy

I have a form that is used to log trouble calls to our support desk. We have
designed a report that allows us to print that support ticket. My only
issues is that when you click the print button you need to enter the support
ticket number to print the data. Is there anyway to have the data that is on
the screen to print in our format just by clicking on a print button?
 
FLGuy said:
I have a form that is used to log trouble calls to our support desk. We
have
designed a report that allows us to print that support ticket. My only
issues is that when you click the print button you need to enter the
support
ticket number to print the data. Is there anyway to have the data that is
on
the screen to print in our format just by clicking on a print button?

Yes, provided that your records have a primary key. Assuming you have a PK
control on your form called "txtID" bound to a field called "ID", you could
use the "where" condition of the Open Report method thus:

DoCmd.OpenReport "rptMyReport", acViewPreview, , "[ID] = " & Me.txtID

Keith.
www.keithwilby.co.uk
 
Back
Top