469,097 Members | 1,388 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,097 developers. It's quick & easy.

How difficult would it be to list all objects in database by last modification date?

MLH
Would like to extract list of database objects
in A97 database and each of their last-modified
dates. What's the best way to proceed? And, is
the last-modified date a property I can read in a
straightforward approach?
Aug 8 '07 #1
4 2987
On Aug 8, 2:13 am, MLH <C...@NorthState.netwrote:
Would like to extract list of database objects
in A97 database and each of their last-modified
dates. What's the best way to proceed? And, is
the last-modified date a property I can read in a
straightforward approach?
It would take you a few minutes examining the Object Browser. The use
of the Object Browser has been explained to you before. It seems you
have ignored the advice, in favour of posting questions here.

It took me less than a minute to find

Debug.Print DBEngine(0)(0).Containers("Forms")
("Categories").Properties("DateCreated").Value
Debug.Print DBEngine(0)(0).Containers("Forms")
("Categories").Properties("LastUpdated").Value

which show

1995-09-13 10:51:50
2007-08-05 11:22:27

for the form "Categories" in my copy of Northwinds.mdb in Access 2000.

It would take me perhaps two minutes to loop through all the objects
and retrieve these values for all the exposed objects in the db.

It might have taken you a little longer but not as long as waiting for
answers here.

If you were to practice using the Object Browser you might even be
able (and willing?) to answer a few questions.

And David might remove you from his killfile; and you might learn
something. But I guess we couldn't count on that.

Aug 8 '07 #2
MLH
I appreciate both the answer and the criticism.
>
It would take you a few minutes examining the Object Browser. The use
of the Object Browser has been explained to you before. It seems you
have ignored the advice, in favour of posting questions here.

It took me less than a minute to find
We each have our own areas of expertise now, don't we?
I cannot recall the last time I fooled with the Object Browser.
I'll take another look at it, as you have suggested. Thanks
for taking the 1 minute to share your knowledge with this NG.
I'm sure I'm not the only one who appreciates your generousity.
>
Debug.Print DBEngine(0)(0).Containers("Forms")
("Categories").Properties("DateCreated").Value
Debug.Print DBEngine(0)(0).Containers("Forms")
("Categories").Properties("LastUpdated").Value

which show

1995-09-13 10:51:50
2007-08-05 11:22:27

for the form "Categories" in my copy of Northwinds.mdb in Access 2000.

It would take me perhaps two minutes to loop through all the objects
and retrieve these values for all the exposed objects in the db.

It might have taken you a little longer but not as long as waiting for
answers here.

If you were to practice using the Object Browser you might even be
able (and willing?) to answer a few questions.

And David might remove you from his killfile; and you might learn
something. But I guess we couldn't count on that.
Aug 8 '07 #3
MLH
I'll try to contribute by taking your example code and expanding upon
it, posting the procedure for looping through all the form objects...

Testing your posted example in my own MDB...
Debug.Print
DBEngine(0)(0).Containers("Forms")("frmMainMenu"). Properties("DateCreated").Value
4/10/2007 9:18:37 PM
Debug.Print
DBEngine(0)(0).Containers("Forms")("frmMainMenu"). Properties("LastUpdated").Value
8/6/2007 9:23:04 PM

That worked just as you said. Then I tried taking one more baby
step...
Dim dbs As Database, wsp As Workspace, ctr As Container, MyForm As
Form
' Return reference to default workspace.
100 Set wsp = DBEngine.Workspaces(0)
' Return reference to current database.
120 Set dbs = CurrentDb
' Return reference to Modules container.
140 Set ctr = dbs.Containers!Forms
MsgBox ctr.Count
160 For Each MyForm In ctr
180 Debug.Print MyForm.Name
200 Next MyForm
220 Set dbs = Nothing

Of course, I got an error in line #160. To enumerate the names of the
form objects in Container ctr - what syntax should I be using in lines
160 to 200? I thought the above would work - but it didn't.
Aug 8 '07 #4
"lyle" <ly************@gmail.comwrote
Where do they get these bozoes who write
this crud, anyway?
Surely, you do not expect anyone in this newsgroup to leap to their feet,
raise their hand, and shout, "Me, me, it was me!", do you?

Hope you enjoyed your camping trip... I'd been wondering why they were
preserving "Wilderness Areas" when "National Parks" were so nice, all things
considered... thanks for enlightening me that it is a place for developers
to go when they need forty days of fasting and temptation. Does anyone ever
_need_ that?

Larry
Aug 10 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Dennis Marks | last post: by
38 posts views Thread by Radi Radichev | last post: by
35 posts views Thread by Thierry Loiseau | last post: by
4 posts views Thread by IdleBrain | last post: by
1 post views Thread by mich dobelman | last post: by
1 post views Thread by Svetac | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.