Solved

Designing Holiday Request Form

Posted on 1998-11-25
1
776 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

729 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