recording print times

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Sorry but i dont realy understand.

I have created a table called "AviPrintDate" with the field name
"AviPrintDate", then i set this feilds default to Now(). So when this table
is opened it records the current date time.

I then created a botton "print avi report" and added the code
DoCmd.OpenTable "AviPrintDate"
DoCmd.Save
DoCmd.Close

Please Note that this report is based of a Querie.

In the querie i have set the criteria for the Date time to
< AviPrintDate.AviprintDate FROM AviPrintDate

But this does not work.
Any help would be appericated.
 
Unless you're adding new rows to table AviPrintDate, having a default value
on field AviPrintDate doesn't buy you much. The default value is what the
field gets initialized to when a row is added to the table. Once it's in the
table, its value doesn't change.
 
Dave,
If you want the date of report print, just place a text control on the report with a
ControlSource of
=Date()
That will always show the date the report was printed.
No need to carry the PrintDate in the table... it can always be calculated on the
report... on the fly.

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 
but i only want the report to print products that have been added to the
querie between the last time the report was printed and now
 
OK, tblAviPrintDate hasjust one field that contains the last date the report printed.
Use that value as a criteria in the query behind the report.
= DLookUp("[AviPrintDate]","AviPrintDate")
Upon closing the report, (Close event) create an update query that will overwrite the old
date with current date.
 
I think your biggest problem is that you are saying use NOW(). This
includes time. If you try to match that field with NOW() even 1 second
from now it WILL NOT MATCH. Use Date() if you want anything added
TODAY.

If you are trying to get only those items added on this date by this
user in this session, then you will need to devise something more
specific that will uniquely identify that condition.

Explain what you are trying to really get and someone can offer you
some more specific suggestions.

Ron
 
On further reading, Al Camp's suggestion is probably what you want.

Ron

(read tooooo fast, and then jumped to conclusions.....)
 
Back
Top