Print single record

Robby

New member
Local time
Today, 16:48
Joined
Aug 7, 2010
Messages
1
Can someone please help me with the following:
I've created a table and a form. I want to add a button in the form which prints the current record in a report which I've designed. I can only print all records since I don't remember how to set up singe record print.

Help is welcome and a sample DB with this function is more than welcome.
 
What I do in these situations is:

I create a special report to just print one record

The report is run from a query which only runs the report

The criteria of the query is set to run the specific record on the form
Forms!FormName!FieldName

The FieldName should be set to a unique identifier as you may have more than record for that person or company. You can also set the critieria to more than one field.
 
No need for queries or another report really, just use the WHERE argument of the OpenReport command and it will filter to the ID passed. Statsman this could help you too:

http://baldyweb.com/wherecondition.htm

Substitute OpenForm for OpenReport.

Once you have that opened (and filtered) then you simply call the Reports("ReportName").Print command.
 

Users who are viewing this thread

Back
Top Bottom