Solved

Designing Holiday Request Form

Posted on 1998-11-25
1
754 Views
Last Modified: 2012-06-21
I am new to Designing in outlook.   I have created two text box date controls in which the user enters the Start and End date for a holiday request from their manager.  I can calculate the difference between the dates but would like to exclude weekends, public (uk) holidays etc.  How can I do this.
0
Comment
Question by:zqureshi
1 Comment
 
LVL 5

Accepted Solution

by:
chewhoung earned 100 total points
ID: 1622021
For checking weekend day, you have to use the Weekday Function in vbscript.

Returns a Variant (Integer) containing a whole number representing the day of the week.

Syntax

Weekday(date, [firstdayofweek])

The Weekday function syntax has these named arguments:

Part      Description
date      Required. Variant, numeric expression, string expression, or any combination, that can represent a date. If date contains Null, Null is returned.
firstdayofweek      Optional. A constant that specifies the first day of the week. If not specified, vbSunday is assumed.
Settings

The firstdayofweek argument has these settings:

Constant      Value      Description
 
vbUseSystem      0      Use the NLS API setting.
vbSunday      1      Sunday (default)
vbMonday      2      Monday
vbTuesday      3      Tuesday
vbWednesday      4      Wednesday
vbThursday      5      Thursday
vbFriday      6      Friday
vbSaturday      7      Saturday
Return Values

The Weekday function can return any of these values:

Constant      Value      Description
 
vbSunday      1      Sunday
vbMonday      2      Monday
vbTuesday      3      Tuesday
vbWednesday      4      Wednesday
vbThursday      5      Thursday
vbFriday      6      Friday
vbSaturday      7      Saturday

For the public holiday part, you have to create a table in a database to store holidays in UK. Then in your form, you have to use vbscript to open the database, open the table and check whether the From and To date has holidays between them.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Outlook Free & Paid Tools
If you don't know how to downgrade, my instructions below should be helpful.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now