Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing "Last Saved Date" in a MS Access report

Status
Not open for further replies.

dax1

MIS
Nov 18, 2002
8
0
0
CA
Hello,

I would like to display/print the date the report was last saved (in essence the version). I have searched the forums and FAQ and could not seem to find anything related other than it seem sI would have to create a table to register the date in question and then assign that field to the report.

I have limited experience with VBA (sounds better than saying nil), but I guess that is the route to go.

Any advice would be much appreciated.

Regards,

Dax1
 
This function will return the value you need for the objects in your database:
Function ReturnProperty(strContainerName As String, strObjectName As String, strPropertyName As String) As String

Dim db As DAO.Database
Dim prop As Property
Dim obj As Object
Dim cont As Container

Set db = CurrentDb
Set cont = db.Containers(strContainerName)
Set obj = cont(strObjectName)
ReturnProperty = obj.Properties(strPropertyName)

End Function

You can use it like this:
returnproperty("reports", "YourReportName", "lastupdated")

Jeremy

==
Jeremy Wallace
AlphaBet City Dataworks
Access Databases for Non-Profit Organizations

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Dim MyDates
MyDates = Date
Lastupdate = Date
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

I use something like this. Where Lastupdate is a column in my main table. If you want it to be visible on your form add a text box and set the control source to Lastupdate. Make sure that text box is formatted for date/time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top