Saving report to a map in macro.. (1 Viewer)

ChristopherL

Registered User.
Local time
Yesterday, 18:09
Joined
Jul 2, 2013
Messages
90
Hi there, think I might be at the right section here even tho it touches the macro-part as well(I think).

What I want to do is save a daily report to a map source, each day the map name changes so for today the map name is "Report2013-10-03", and tomorrow the map name will be "Report2013-10-04".

Is this possible? is there some function like save(Report%s) where %s = date() ?

Kind regards! :D
 

pr2-eugin

Super Moderator
Local time
Today, 02:09
Joined
Nov 30, 2011
Messages
8,494
How are you exporting thr report? If you are using DoCmd.OutputTo method, you can use the OutputFile argument to do this..
 

ChristopherL

Registered User.
Local time
Yesterday, 18:09
Joined
Jul 2, 2013
Messages
90
How are you exporting thr report? If you are using DoCmd.OutputTo method, you can use the OutputFile argument to do this..

At the moment I am just sending it out as an XLS report through mail..
But my company wanted storage of the report.

I am using access 02! :)

rgrds
/ C
 

Mr Smin

Sometimes Excel too.
Local time
Today, 01:09
Joined
Jun 1, 2009
Messages
132
I think pr2-eugin meant you can use the OutputTo command in a macro or VBA. If you follow the link you will see how the command is used. You can put the date into the file name a bit like
DoCmd.OutputTo(ObjectType, ObjectName, OutputFormat, "C:\reports\" & Date(), AutoStart, TemplateFile, Encoding, OutputQuality)

Note that I've left most of the parameters as dummy entries and only put an example for the one I'm highlighting - this will make more sense once you read the msdn page.
 

ChristopherL

Registered User.
Local time
Yesterday, 18:09
Joined
Jul 2, 2013
Messages
90
Great! I'll start trying out some vba coding :)

Thanks for the help! ::D
 

Users who are viewing this thread

Top Bottom