Printing a Record only

  • Thread starter Thread starter LP
  • Start date Start date
L

LP

Hi,

If i have a table with 1000 records, how can i print a report for just
only one of this records?

Thanks in advance
 
LP said:
If i have a table with 1000 records, how can i print a report for just
only one of this records?


Create a form with an unbound text box where you can specify
the record to print. Add a command button to open the
report. The button wizard will generate most of the code
you need and you can modify it to use the OpenReport
method's (see Help) WhereCondition argument. so that the
code looks something like:

stDoc = "reportname"
stWhere = "keyfieldname = " & textboxname
DoCmf.OpenReport stDoc, , , stWhere

If the table's key field is a text type field, use this
instead:

stWhere = "keyfieldname = """ & textboxname & """"
 

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

Back
Top