Jump to content

Programming Calendar In Access...


jdeneca

Recommended Posts

I am using Access 2007 unfortunately at work and trying to program the calendar to pull a report that I have setup to run every day. I want the report to run on a business day standard. (Ex. Monday, Tuesday, Wednesday, Thursday, Friday, no weekends)I have this built into a macro and I know that there is a Event Procedure that I can input a code for the date. At first I was thinking it was the WeekDay function but it doesn't want to work for me.Any idea how to do this so I can have this report run everyday but weekends?

Link to comment
Share on other sites

Are you doing all of that in VBA? I haven't touched VB, VBScript, or VBA in ages, but something along these lines might work:

Select Case WeekDay(Now)	Case 1, 2, 3, 4, 5		' Here is where you'd put your code that should execute on weekdays	Case 0, 6		' This only executes on weekends

Select Case: http://www.ozgrid.com/VBA/select-case.htmWeekDay: http://msdn.microsoft.com/en-us/library/aa227552(VS.60).aspx

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...