Print current record

morlan

Registered User.
Local time
Today, 09:47
Joined
Apr 23, 2003
Messages
143
Hi,

I have a form in which users input credit card applications. Each application is an A4 page, therefor each record is an A4 page.
I have created a report that will print out any record and this works fine... but
Ideally the user would key in the data in the form and then choose 'Print' and it would just print the one record that they just keyed.

Also, It would be good if the user had the option to print out all records keyed that day, or maybey If they could select the records from the database that they want to print.

I need to make it as simple as possible for the user.

Any suggestions welcome.

Thanks
 
If the query that supplies the table does not already have any parameters in it, you can use the where condition of the openreport method to specify which records to print. You could have buttons to 'print current record' and 'print today's records'

For example, to print only the current record.
Code:
docmd.openreport "NameOfReport", acViewNormal,,"[CustomerID] = " & me.customerID
eg for todays records
Code:
docmd.openreport "NameOfReport", acViewNormal,,"[DateCreated] = #" & Date() & "#"
If you wanted to select a range of records, the best way I think is to use a multiseect listbox and dynamically create the SQL statement to populate the report. Searching this forum will throw up plenty of examples and code.
 

Users who are viewing this thread

Back
Top Bottom