end of month reports automated? (1 Viewer)

vicsaccess

New member
Local time
Today, 10:32
Joined
Jul 17, 2015
Messages
7
still learning but here's my question. is there a way to have my database see that its a new month and then run a report that could be automatically emailed?
 

burrina

Registered User.
Local time
Today, 10:32
Joined
May 10, 2014
Messages
972
Lot's of variables there. What if the db is not open when it's time?
What email client are you using?
 

vicsaccess

New member
Local time
Today, 10:32
Joined
Jul 17, 2015
Messages
7
that's were I'm learning and scratching my head. what if the 1st of the month falls on Sunday? we are using outlook. I have it auto emailing some other stuff when they push the "end shift" button. I was curious if we could get it to recognize the first Monday of the month and then run the report? would this be a macro?
 

vicsaccess

New member
Local time
Today, 10:32
Joined
Jul 17, 2015
Messages
7
sorry but that's above my head. how can that be used to find the first Monday of each month? what if I created a table that held all the 12 dates of the year that I wanted the database to run this particular report? how would I have it compare the current date to the dates in the table and decide if "true" then continue? that may be a easier path. once a year I could look at a calendar and type in the 12 dates that I want it to run.
 

burrina

Registered User.
Local time
Today, 10:32
Joined
May 10, 2014
Messages
972
That's not the way to do it! You would have to keep repeating this every time.
Example:
PHP:
FirstDayInMonth = DateSerial(Year(Date), Month(Date), 1)
PHP:
Last day of the current month:
DateSerial(Year(Date), Month(Date) + 1, 0)

PHP:
FirstMonday=DateSerial(Year(Now()),Month(Now()),1+1*7)-Weekday(DateSerial(Year(Now()),Month(Now()),8-2))

HTH
 
Last edited:

Users who are viewing this thread

Top Bottom