View Full Version : Filenames on Sendobject


jimmymd82
03-16-2007, 01:17 AM
Guys, I need to email a query as an excel document once a day (will be started by a scheduled task)

I need the file name to include the date ie test160307.xls

This is what ive got so far

DoCmd.SendObject acQuery, "PASS_NA", "MicrosoftExcel(*.xls)", "recipients", "", "", "NA Visit Data", ,"False, """

PLEASE HELP ME!!!

Dennisk
03-16-2007, 01:22 AM
use the format() function

format(myDate,"dd/mm/yy") this will return a string so concatenate this to your filename

jimmymd82
03-16-2007, 01:26 AM
Thanks for this mate but can you bit a bit more specific, im completly new to this