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

Get the DateModified property of a form in another DB 1

Status
Not open for further replies.

jkirkland

Technical User
Apr 24, 2003
61
US
I am trying to read the DateModified property of a form in another db (to compare it to a form in the current db that has the same name)

I know how to get this property in the currentdb using:

Dim Obj as Object

For each Obj in CurrentProject.AllForms
Debug.Print Obj.DateModified
Next Obj

I don't know how to reference another db as the "CurrentProject" though.

Any suggestions?
 
Code:
Dim mydb As Access.Application
Set mydb = CreateObject("Access.Application")
mydb.OpenCurrentDatabase "c:\xxxx.mdb"
Debug.Print mydb.Application.CurrentProject.AllForms("formname").DateModified
 
Awesome! That worked perfectly.
Thanks for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top