Maximum Date Created

B

beavetoots

I need to find the last ( latest create date) .xls file that was created
within a group of folders within another folder: I'm doing this from within
an Access DB

For example
folder1 (primary folder)
0101 (subfolder)
NAME CREATE DATE
0101.xls 2008-01-01
0102 (subfolder)
0202.xls 2008-02-02
0103 (subfolder)
0303.xls 2008-03-03

I need to be able to pick up the filename with the latest creation date
(0303.xls) to be able to automatically
do some formatting with it (without user intervention)
 
T

Tom van Stiphout

On Thu, 10 Jul 2008 05:18:01 -0700, beavetoots

You can loop over the items in a folder using the Dir function. Within
the loop you can remember the latest file with a local variable. You
can test if the current item is a subfolder using the GetAttr
function. You can get the date of a file using the FileDateTime
function. Check the help file for more info.

-Tom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top