Printing single records by date?

spacepro

Registered User.
Local time
Today, 20:05
Joined
Jan 13, 2003
Messages
714
Hi Guys,
I have a form with a button that prints 3 copies of the current record.
I want to add the record to a say batch print run and print all records entered that day on our custom designed delivery note(Access report) individually altogether, this to avoid anyone not pressing the print delivery note button, and also to stop d/notes coming of the database every few minutes.

I was wondering how to go about this. Any suggestions.

Thanks
Andy
 
I'll give you the overview. You'll have to work through the Help files to do this completely.

1. Write a query that would select the records that you wanted when you ran it. This will probably require you to use a DateDiff function. Possibly plus another DateAdd function depending on exactly when your cutoff time is. These computed dates would feed your selection criteria.

2. Write your report to use this query as a recordsource. (Rather than the entire table.) So that means including the required records in the query to support the report you wanted.

3. Write a macro that opens the report (look up OpenReport action.) One of the OpenReport modes automatically enqueues the report to the default printer. This macro should end with the Quit action.

4. Using the Windows Task Scheduler, open your database at your selected time. As part of the command line, include /X and the name of the macro.

5. Remember that the printer and computer must be turned on at the desired time or this won't work correctly.

6. Only make the scheduler entry on ONE machine, and that machine must be the one you leave on at the specified time.

That should mostly do what you want. Debugging it would be simply to create a shortcut to open that same database with the same /X command-line option and macro name. Going into production would require that you launch the shortcut at the selected time.
 
Last edited:
I will give it a try.
Thanks Doc Man

Andy;)
 
Just done the query.TRouble!

I have an orders form with a product detail subform in.
I based the query on the tables and put the criteria of [Enter Delivery Date].no problem.

for example there is one record that has several product lines which is related to the orders form, so in the query is shows say 5 lines for the same ID, and then other records.

I set the report recordsource to the query and even put the ID in the filter criteria on the report, but it show that record the same time 5 times.

Do you know of any filter criteria for the report so it only selects the one ID, instead of duplicating it five times in the report.

Nearly there.
Any help is appreciated.

Thanks
Andy
 
Thanks Docman, I have achieved what you have suggested and received help from neileg with the query.

Big Thanks to Docman & Neileg
Andy
 

Users who are viewing this thread

Back
Top Bottom