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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change the recordsource for a form to include another table 1

Status
Not open for further replies.

cfvcf

Technical User
Nov 8, 2007
77
US
I have a form that was built with the form wizard, and I want to add another table to the form's record source, because I want to also use a table that shows a date of the last time the DB was updated or accessed.

I have an Exit button that I will store the current date/time when it closed. Then when the menu opens, it will display it in the footer. Thanks!
 
You can do this two ways. You can use a subform and put the subform in the footer. The recordsource of the subform can be the table with your date. Or use an unbound text box. The control source of the unbound textbox can use a dmax function to pull the greatest date from your table.
DMax(expr, domain [, criteria] )
Something like
=dlookup("dtmTheDate","tblUpdateDates")
 
Ok, let me ask this another way, because my thought has changed. I want to display the file name & location, current date and time stamp of the MDB file that you can see in Windows Explorer.
 
Although that was a great way to approach it - thanks!
 
in a unbound textbox for the path and name
=currentDB.name
for the current date
=date()
for the time stamp
=filedatetime(currentDB.name)
However for the time stamp not sure which time you are looking for. This will change if time you access the mdb I believe.
 
You can wrap the date and filedatetime functions in a format function to return a format that you like.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top