Dynamic Filenames

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi There.

In our department, we create a daily Excel report and drop it in a
designated folder. We use the same naming convention each day we generate the
report - for example, today's report was called "Report 092804.xls". The
numeric portion of the filename reflects today's date, ie 09-28-04. With me?

Now, what we'd like to do is add a launch button to our Access 97
application that will launch "today's" spreadsheet, and then do the same
thing again each subsequent day. Since we have a consistent naming convention
- with only the date portion of the filename changing - is there a way for
Access to match today's date with today's filename?
 
simsjr said:
In our department, we create a daily Excel report and drop it in a
designated folder. We use the same naming convention each day we generate the
report - for example, today's report was called "Report 092804.xls". The
numeric portion of the filename reflects today's date, ie 09-28-04. With me?

Now, what we'd like to do is add a launch button to our Access 97
application that will launch "today's" spreadsheet, and then do the same
thing again each subsequent day. Since we have a consistent naming convention
- with only the date portion of the filename changing - is there a way for
Access to match today's date with today's filename?


You can easily create the file name using:

strFile = "Report " & Format(Date, "mmddyy") & ".XLS"

How you "launch" it is up to you, Shell?
 
Back
Top