Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Reports - Recording date / time for printing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 09 Jul 2006 12:27 GMT
I want to be able to print a "product order" report but i only want it to
include "products" that have been added since the last report was printed.


Ofer Cohen - 09 Jul 2006 18:55 GMT
You'll need to store the date when the report was printed in a table, and
then retrieve it again before you print the report again

Dim MyFlter As String
MyFilter = "[DateFieldNameInTable] > #" & DlookUp("FieldName","TableName") &
"#"
Docmd.OpenReport  "ReportName" , , , MyFilter
Docmd.RunSQL "UPDATE TableName SET TableName.FieldName = Date()"

===========================
Unless you have another way to track which records were last to be printed,
then use it.
For example a counter

Dim MyFlter As String, MaxRecord as Long
MaxRecord = DlookUp("FieldName", "TableName")
MyFilter = "[DateFieldNameInTable] > " & MaxRecord
Docmd.OpenReport  "ReportName" , , , MyFilter
Docmd.RunSQL "UPDATE TableName SET TableName.FieldName = " & MaxRecord

Signature

Good Luck
BS"D

> I want to be able to print a "product order" report but i only want it to
> include "products" that have been added since the last report was printed.
>
>  
Dave - 10 Jul 2006 06:26 GMT
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.

> You'll need to store the date when the report was printed in a table, and
> then retrieve it again before you print the report again
[quoted text clipped - 20 lines]
> >
> >  
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.