When was a report prnted? (1 Viewer)

kevinglasgow

New member
Local time
Today, 00:11
Joined
Aug 17, 2018
Messages
3
Hi all,

I’m new to this forum and very new to Access.

We use Access to log and track our subscription customers.

Customers are sent their orders every month or every 2 months, i use the report function to print mailing labels based on the order details.

There are several people that have access to the database and it gets very confusing on when an order has been sent out, i am wandering if there is a way of inserting a date field into a table when a label report has been run?

Any help/advice would be greatly appreciated
 

Minty

AWF VIP
Local time
Today, 00:11
Joined
Jul 26, 2013
Messages
10,355
There is no easy definitive way of checking a report has actually been printed, so the normal route is to include a PrintDate field, and after the use of a command button to print the report, run a update query to set that field. Your query to print the records would exclude anything with a PrintDate other than null.

You should also include a way to reverse that process e.g. reset anything for a specific day in case of a printer error or some other unforeseen foul up.
 

kevinglasgow

New member
Local time
Today, 00:11
Joined
Aug 17, 2018
Messages
3
Thanks for the reply, I'm not used to Access at all - its a minefield!

I spent the good part of yesterday trying to search for a solution.


I have created an extra field in the table 'LastPrinted', i assume that the easiest way would be to just input the date manually when the report is printed.

We have 632 records - is there an easy input a date, without having to go into every record
 

Minty

AWF VIP
Local time
Today, 00:11
Joined
Jul 26, 2013
Messages
10,355
Ah - don't read UA very often.

@Kevin please have a read here https://www.excelguru.ca/content.php?184

To answer your question run a update query and set all the records to a default date. Something like
Code:
Update YourTable 
Set LastPrinted = #01/01/2018#
WHERE LastPrinted Is Null

Change the #01/01/2018# date to Date() when you are done and you have your query to run after printing.
 

kevinglasgow

New member
Local time
Today, 00:11
Joined
Aug 17, 2018
Messages
3
Hi,

Thanks for the link - sorry i didn't think about that, i was just thinking - more heads are better than one
 

Mark_

Longboard on the internet
Local time
Yesterday, 17:11
Joined
Sep 12, 2017
Messages
2,111
A more elaborate way of doing this is to have ONE table that holds ONE configuration record. This would hold your "Last Printed" date.

In your existing table, you would have a "Next Printing" field.

When you run your report, you print everything that has a "Next Printing" that is between "Last Printed" and Today. After you do your print job, you then update your configuration record to make "Last Printed" be today.

After you verify that your print job worked and you have all of the labels you need, then you run a separate process that updates your "Next Printing" to be one or two months from now.

If, during the day, you discover you need to reprint a label or two, go in to your existing table and reset "Next Printing" to today and re-run your report. This will probably be a "OK, want to add this after I figure out what I am doing" kinda thing. Hopefully you will be able to work it in over the next month or two.

It WILL make some things far easier on you.

If you don't want to save the last printing date you don't, I've just found it useful in the past to keep things like this handy. If you DON'T use it, you would still print everything that has a "Next Printing" date of today or before. I would still have the update to Next Printing be done by a process you run after you manually verify that the print job worked, just to be sure.
 

Minty

AWF VIP
Local time
Today, 00:11
Joined
Jul 26, 2013
Messages
10,355
@Mark - Good twist on a basic concept.
I'd never thought of that for printing, but have used a similar concept for things like expiry or renewal dates.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 19:11
Joined
Feb 28, 2001
Messages
27,001
In THEORY, you can - but rarely do - run updates from a report. There are all sorts of places where you can add some VBA to a report section. For example, the report footer section, which is the last section to be formatted. You could run an UPDATE from that section if that was what you really wanted to do. And you would do that only in the ReportFooter_Print event code. But...

The reason you don't usually do this is because you can open a report in print preview without actually printing it. Therefore, if you do this by clicking a button that says "PRINT THE REPORT," the place to do the update isn't from the report itself, it is done from the thing that opens the report for printing and sends it to the printer.

I'm not used to Access at all - its a minefield!

We empathize on this. With Access, often the trick is to learn what happens WHEN you do a particular thing. Once you gain an appreciation of event timing, it becomes easier to know when you should attack a particular problem - and knowing WHEN often leads to knowing HOW.

Anyway, if you had a field somewhere in some table to track this report's usage, you would simply run the update query just after you used the DoCmd sequence that opened and printed the report. Just after, but in the same sequence of code.

Now, if this is an issue for you (audit-level accountability), I might consider that you actually need a separate table that lists Report Name, Date Printed, and Who Printed. That is, of course, a decision that MUST be based on your business model as to whether that is what you need. I'm just offering an opinion about what you MIGHT need if your interest goes to the level of remembering when something was last printed.

This goes to the basic design issue that Access won't tell you anything you didn't tell it first. If you want to know when something was printed, you have to TELL Access that it was printed so it can remind you later that it actually DID that.
 

Mark_

Longboard on the internet
Local time
Yesterday, 17:11
Joined
Sep 12, 2017
Messages
2,111
@ OP and Minty,

The trick I learned a loooong time ago is that when managing what gets printed you need to answer "Can/Should" this be able to be printed more than once?

ONLY time where I've had to control and limit how many times a given report could be run per record was in a system to manage casinos. There since the printing could go to serialized forms or have fiscal value, bad prints required managers review and approval plus tracking of serialized forms PRIOR to reprints.

For a label, you seldom need to make sure its printed once and only once. You will normally also want to verify that it was printer properly and placed on the item properly BEFORE you say "OK, done for now".

Something you may want to look at for the far future, if you find you need to redo specific labels, is adding a "Reprint" flag that is manually set if a reprint is required for a specific batch. Then call the same report but limited to "Reprint=true".

On your report, do you print to sheets of labels such that you need to start at a specific point on the sheet?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 19:11
Joined
Feb 28, 2001
Messages
27,001
Minty, I agree with you about knowing whether something had fiduciary value as to whether it was printed or not. However, with the Navy, we had another issue. Turns out that putting a name and full street address on a printing label sometimes involves the Privacy Act so we had to track ANY EVENT that impinged on printing address labels. For us, it was less about HOW MANY times it was printed; it was FOR WHOM it was printed. Essentially, an audit for accountability of "need to know."

Since the OP is involved with a commercial subscription service, there are at least a FEW possible fiduciary or privacy issues. Only kevinglasgow is in a position to know the exact importance and the answer to the "Can/Should" question about what is tracked.
 

Mark_

Longboard on the internet
Local time
Yesterday, 17:11
Joined
Sep 12, 2017
Messages
2,111
Doc,

Was that addressed to me????

I didn't get into PII or FOIA related issues as they tend to be very specific to certain industries, same with HIPAA or security clearance related tracking. As it is related to a service/subscription (in this context may be media being sent) I figured I'd include the concept as there may be a cost involved if the same subscription is sent more than once or if pre-paid postage is in play.
 

Users who are viewing this thread

Top Bottom