PC Review


Reply
Thread Tools Rate Thread

automate file name with report date

 
 
outrigger
Guest
Posts: n/a
 
      25th Feb 2010
I have a form that automatically updates report data, with the date put in
the form. These reports are then run by use of a macro that outputs them all
as SNP files. all at once. Each time the report is run it states file
already exist do I want to overwrite file, since the file is the same name
that is understandable. I would like to get the new month to automatically
appear on the file title for each report.snp. ie Nov report.snp where the
original file was report.snp. I cannot use the Date or Now functions because
the true date of the report is 3 monts in the past. I do have a table with
the last date that was updated as it's first record. This is updated every
time the report is updated.
Any suggestion?
 
Reply With Quote
 
 
 
 
Jeff Boyce
Guest
Posts: n/a
 
      26th Feb 2010
Are you sure "the new month" will work for your situation?

After all, each year has a "January", a "February", ...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.


"outrigger" <(E-Mail Removed)> wrote in message
news:44BEE8C8-4B5A-4B92-BA14-(E-Mail Removed)...
>I have a form that automatically updates report data, with the date put in
> the form. These reports are then run by use of a macro that outputs them
> all
> as SNP files. all at once. Each time the report is run it states file
> already exist do I want to overwrite file, since the file is the same name
> that is understandable. I would like to get the new month to automatically
> appear on the file title for each report.snp. ie Nov report.snp where the
> original file was report.snp. I cannot use the Date or Now functions
> because
> the true date of the report is 3 monts in the past. I do have a table
> with
> the last date that was updated as it's first record. This is updated
> every
> time the report is updated.
> Any suggestion?



 
Reply With Quote
 
outrigger
Guest
Posts: n/a
 
      26th Feb 2010
Wel the criteria table's field Dateofinterest is formated as
1/1/2009,2/1/2009,etc only the month, first day ie1, and then the year are
used. This grabs all the records dates for that particular month. So I
guess the actual 1/1/2009 would work.
Have some suggestions?

"Jeff Boyce" wrote:

> Are you sure "the new month" will work for your situation?
>
> After all, each year has a "January", a "February", ...
>
> Regards
>
> Jeff Boyce
> Microsoft Access MVP
>
> --
> Disclaimer: This author may have received products and services mentioned
> in this post. Mention and/or description of a product or service herein
> does not constitute endorsement thereof.
>
> Any code or pseudocode included in this post is offered "as is", with no
> guarantee as to suitability.
>
> You can thank the FTC of the USA for making this disclaimer
> possible/necessary.
>
>
> "outrigger" <(E-Mail Removed)> wrote in message
> news:44BEE8C8-4B5A-4B92-BA14-(E-Mail Removed)...
> >I have a form that automatically updates report data, with the date put in
> > the form. These reports are then run by use of a macro that outputs them
> > all
> > as SNP files. all at once. Each time the report is run it states file
> > already exist do I want to overwrite file, since the file is the same name
> > that is understandable. I would like to get the new month to automatically
> > appear on the file title for each report.snp. ie Nov report.snp where the
> > original file was report.snp. I cannot use the Date or Now functions
> > because
> > the true date of the report is 3 monts in the past. I do have a table
> > with
> > the last date that was updated as it's first record. This is updated
> > every
> > time the report is updated.
> > Any suggestion?

>
>
> .
>

 
Reply With Quote
 
Jeff Boyce
Guest
Posts: n/a
 
      26th Feb 2010
It's important to remember the distinction between how dates are formatted
(e.g., "displayed"), and how they are stored.

Display format only affects how they appear...

Are those fields in the table actually Date/Time values?

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"outrigger" <(E-Mail Removed)> wrote in message
news:BF68CECE-7BB6-4B94-BF72-(E-Mail Removed)...
> Wel the criteria table's field Dateofinterest is formated as
> 1/1/2009,2/1/2009,etc only the month, first day ie1, and then the year are
> used. This grabs all the records dates for that particular month. So I
> guess the actual 1/1/2009 would work.
> Have some suggestions?
>
> "Jeff Boyce" wrote:
>
>> Are you sure "the new month" will work for your situation?
>>
>> After all, each year has a "January", a "February", ...
>>
>> Regards
>>
>> Jeff Boyce
>> Microsoft Access MVP
>>
>> --
>> Disclaimer: This author may have received products and services mentioned
>> in this post. Mention and/or description of a product or service herein
>> does not constitute endorsement thereof.
>>
>> Any code or pseudocode included in this post is offered "as is", with no
>> guarantee as to suitability.
>>
>> You can thank the FTC of the USA for making this disclaimer
>> possible/necessary.
>>
>>
>> "outrigger" <(E-Mail Removed)> wrote in message
>> news:44BEE8C8-4B5A-4B92-BA14-(E-Mail Removed)...
>> >I have a form that automatically updates report data, with the date put
>> >in
>> > the form. These reports are then run by use of a macro that outputs
>> > them
>> > all
>> > as SNP files. all at once. Each time the report is run it states file
>> > already exist do I want to overwrite file, since the file is the same
>> > name
>> > that is understandable. I would like to get the new month to
>> > automatically
>> > appear on the file title for each report.snp. ie Nov report.snp where
>> > the
>> > original file was report.snp. I cannot use the Date or Now functions
>> > because
>> > the true date of the report is 3 monts in the past. I do have a table
>> > with
>> > the last date that was updated as it's first record. This is updated
>> > every
>> > time the report is updated.
>> > Any suggestion?

>>
>>
>> .
>>



 
Reply With Quote
 
outrigger
Guest
Posts: n/a
 
      19th Mar 2010
Jeff,
I went to the table and they are stored as Date/Time.
Dan (outrigger)

"Jeff Boyce" wrote:

> It's important to remember the distinction between how dates are formatted
> (e.g., "displayed"), and how they are stored.
>
> Display format only affects how they appear...
>
> Are those fields in the table actually Date/Time values?
>
> Regards
>
> Jeff Boyce
> Microsoft Access MVP
>
> --
> Disclaimer: This author may have received products and services mentioned
> in this post. Mention and/or description of a product or service herein
> does not constitute endorsement thereof.
>
> Any code or pseudocode included in this post is offered "as is", with no
> guarantee as to suitability.
>
> You can thank the FTC of the USA for making this disclaimer
> possible/necessary.
>
> "outrigger" <(E-Mail Removed)> wrote in message
> news:BF68CECE-7BB6-4B94-BF72-(E-Mail Removed)...
> > Wel the criteria table's field Dateofinterest is formated as
> > 1/1/2009,2/1/2009,etc only the month, first day ie1, and then the year are
> > used. This grabs all the records dates for that particular month. So I
> > guess the actual 1/1/2009 would work.
> > Have some suggestions?
> >
> > "Jeff Boyce" wrote:
> >
> >> Are you sure "the new month" will work for your situation?
> >>
> >> After all, each year has a "January", a "February", ...
> >>
> >> Regards
> >>
> >> Jeff Boyce
> >> Microsoft Access MVP
> >>
> >> --
> >> Disclaimer: This author may have received products and services mentioned
> >> in this post. Mention and/or description of a product or service herein
> >> does not constitute endorsement thereof.
> >>
> >> Any code or pseudocode included in this post is offered "as is", with no
> >> guarantee as to suitability.
> >>
> >> You can thank the FTC of the USA for making this disclaimer
> >> possible/necessary.
> >>
> >>
> >> "outrigger" <(E-Mail Removed)> wrote in message
> >> news:44BEE8C8-4B5A-4B92-BA14-(E-Mail Removed)...
> >> >I have a form that automatically updates report data, with the date put
> >> >in
> >> > the form. These reports are then run by use of a macro that outputs
> >> > them
> >> > all
> >> > as SNP files. all at once. Each time the report is run it states file
> >> > already exist do I want to overwrite file, since the file is the same
> >> > name
> >> > that is understandable. I would like to get the new month to
> >> > automatically
> >> > appear on the file title for each report.snp. ie Nov report.snp where
> >> > the
> >> > original file was report.snp. I cannot use the Date or Now functions
> >> > because
> >> > the true date of the report is 3 monts in the past. I do have a table
> >> > with
> >> > the last date that was updated as it's first record. This is updated
> >> > every
> >> > time the report is updated.
> >> > Any suggestion?
> >>
> >>
> >> .
> >>

>
>
> .
>

 
Reply With Quote
 
Jeff Boyce
Guest
Posts: n/a
 
      22nd Mar 2010
If you are trying this in a query (you mentioned "selection criterion"), you
could use criterion for that date/time field that calculated the date three
months ago.

Take a look at Access HELP for the DateAdd() function, and use the Date()
function to get today's date. If you ONLY need to know a month (and year!),
you could use the Month() and Year() functions.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.

"outrigger" <(E-Mail Removed)> wrote in message
news:A7EEEFD1-3A48-41B7-A142-(E-Mail Removed)...
> Jeff,
> I went to the table and they are stored as Date/Time.
> Dan (outrigger)
>
> "Jeff Boyce" wrote:
>
>> It's important to remember the distinction between how dates are
>> formatted
>> (e.g., "displayed"), and how they are stored.
>>
>> Display format only affects how they appear...
>>
>> Are those fields in the table actually Date/Time values?
>>
>> Regards
>>
>> Jeff Boyce
>> Microsoft Access MVP
>>
>> --
>> Disclaimer: This author may have received products and services mentioned
>> in this post. Mention and/or description of a product or service herein
>> does not constitute endorsement thereof.
>>
>> Any code or pseudocode included in this post is offered "as is", with no
>> guarantee as to suitability.
>>
>> You can thank the FTC of the USA for making this disclaimer
>> possible/necessary.
>>
>> "outrigger" <(E-Mail Removed)> wrote in message
>> news:BF68CECE-7BB6-4B94-BF72-(E-Mail Removed)...
>> > Wel the criteria table's field Dateofinterest is formated as
>> > 1/1/2009,2/1/2009,etc only the month, first day ie1, and then the year
>> > are
>> > used. This grabs all the records dates for that particular month. So
>> > I
>> > guess the actual 1/1/2009 would work.
>> > Have some suggestions?
>> >
>> > "Jeff Boyce" wrote:
>> >
>> >> Are you sure "the new month" will work for your situation?
>> >>
>> >> After all, each year has a "January", a "February", ...
>> >>
>> >> Regards
>> >>
>> >> Jeff Boyce
>> >> Microsoft Access MVP
>> >>
>> >> --
>> >> Disclaimer: This author may have received products and services
>> >> mentioned
>> >> in this post. Mention and/or description of a product or service
>> >> herein
>> >> does not constitute endorsement thereof.
>> >>
>> >> Any code or pseudocode included in this post is offered "as is", with
>> >> no
>> >> guarantee as to suitability.
>> >>
>> >> You can thank the FTC of the USA for making this disclaimer
>> >> possible/necessary.
>> >>
>> >>
>> >> "outrigger" <(E-Mail Removed)> wrote in message
>> >> news:44BEE8C8-4B5A-4B92-BA14-(E-Mail Removed)...
>> >> >I have a form that automatically updates report data, with the date
>> >> >put
>> >> >in
>> >> > the form. These reports are then run by use of a macro that outputs
>> >> > them
>> >> > all
>> >> > as SNP files. all at once. Each time the report is run it states
>> >> > file
>> >> > already exist do I want to overwrite file, since the file is the
>> >> > same
>> >> > name
>> >> > that is understandable. I would like to get the new month to
>> >> > automatically
>> >> > appear on the file title for each report.snp. ie Nov report.snp
>> >> > where
>> >> > the
>> >> > original file was report.snp. I cannot use the Date or Now
>> >> > functions
>> >> > because
>> >> > the true date of the report is 3 monts in the past. I do have a
>> >> > table
>> >> > with
>> >> > the last date that was updated as it's first record. This is
>> >> > updated
>> >> > every
>> >> > time the report is updated.
>> >> > Any suggestion?
>> >>
>> >>
>> >> .
>> >>

>>
>>
>> .
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Report to Filter on Next Date Per File LDMueller Microsoft Access VBA Modules 2 5th Feb 2010 01:46 PM
In Excel 2003, how do I automate file naming/saving + date? MichaelOfficer Microsoft Excel Setup 0 16th Jul 2009 09:19 AM
Show current report date and prior report date in same report mogll Microsoft Access Reports 4 26th Jan 2009 01:28 PM
Can I automate exporting an Access report as a .rtf file? Spottie Microsoft Access External Data 1 30th May 2008 08:36 PM
Automate Excel report to place certain data into existing report? =?Utf-8?B?Q3JhaWcgSGFycmlzb24=?= Microsoft Excel Worksheet Functions 3 25th Jul 2006 01:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:58 AM.