You are here:

Using MS Access/Applying Date Stamp to file name without VBA



Using 2010, skill level is intermediate. The limited knowledge I had on VBA has long been for gotten. Have not used it in over 10 years.

Trying to create a Macro. One piece that I am having a problem is renaming the excel output file. Want to have a date stamp on the file (DailyFile_063014.xlsx). I can write the query to get the date stamp. I think I populated the setTempVar. But I can't figure out how to concatenate it to the file.

Any suggestions/ ideas?



Depending on where you put it, the code will look like:

X = "DailyFile_" & Format(Date(),"mmddyy")

If it's a query field:

X: "DailyFile_" & Format(Date(),"mmddyy")

Be sure to visit my web site and watch my FREE 2-hour-long Microsoft Access Video Tutorial

Richard Rost
Microsoft Access MVP
599CD Computer Training

Using MS Access

All Answers

Answers by Expert:

Ask Experts


Richard Rost


I am happy to answer any kinds of questions about Microsoft Access - from basic table design to advanced VBA programming. Also, please feel free to check the Access Tips & Tricks section of my web site, and free Access 101 tutorial.


I am the president of and I specialize in Microsoft Access Tutorials. I have been teaching Access in the classroom since 1994, and online since 2002.

I am a self-taught Access expert. I have been building databases for clients since the early 90s. You can see a sample of my Access Tutorials on my web site at

©2017 All rights reserved.