Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduler Using Radio Buttons

Status
Not open for further replies.

gimmyd

Technical User
Apr 12, 2002
36
US
I want to set up a scheduler that uses radio buttons that would pick 1st, 2nd, 3rd or 4th Mon., Tue., Wed., etc of more than one month. For example, I want to have a report produced for the 1st Mon in Jan., Apr., Jul., & Oct. or the 3rd Wed. in Jan. & Jul. In particular I'm unsure of how to reference the particular occurance of a day of the week. Any ideas?
 
Every day has a reference number ie: Sunday is 1, Monday is 2 etc...
equally each date has a day and a number that can be found.
Have a look at the DatePart function

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
I understand the DatePart() function but am having trouble with the logic of determining the 2nd, 3rd, or 4th occurance of a particular day of the week. How do you find the 3rd Monday in June of 2007 without using a calendar to manually choose it? I would like to automate and be able to choose through code behind radio groups and check boxes. Radio button group for 1st, 2nd, 3rd, 4th. Check boxes for days of week. Check boxes for Months and check boxes for the year. Any dates meeting the criteria of the check boxes would become part of query criteria.
 
Hi,
I can tell you from experience that what you are attempting is highly complex and will need a lot of coding and trapping. An application we developed required us to calculate the full weeks in a month with the weeks being Monday to Friday - it was hard work!
A principle you could work on is that you can find the 1st of every month and determine the daynumber, if the daynumber is for Tuesday and your report is for Wed then add 1 if its for Monday add 6.
The more I look at this the easier it becomes...
You can ignore the month and the year as long as you know the 1st of the month..any month.

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top