create a form allowing a report to be printed with just selected .

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Access 2002, I have a form to enter/edit data that I would also like to use
to select just certian records to be printed to a report. The table that the
form is based upon contains a field that lists buyer numbers. I would like
to just select and print from the form a specific buyer number.

Thanks for the help
 
It is not clear if you just want to send/print the current record you are
looking at to the report, or you want to select a bunch?

To send the record you are looking at to a report, you can put the following
code behind a print button:


dim strWhere as string

strWhere = "ID = " & me.ID

me.refresh

docmd.OpenReport "YourReport",acViewPreview,,strWhere
 
Would this procedure allow for someone to select a record from a table and
then open the corresponding report?
 
You would select it from a form, not a table. In other words, you'd open
your form, find te record you want to print, then click the button that you
create with the code below tied to that button.
 
Back
Top