473,657 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access: calculate field on FORM to exclude weekends & holidays

3 New Member
I have searched, but everything I'm finding is not really answering my question.

I have a field on a form that is calculated when a chk box is clicked. It is calculating a date to follow up that is 35 days in the future. I need this date to exclude weekends and my company's holidays. I have a separate Holidays table ready. I am not able to figure this one out, can anyone help? I need to get this working on a few different check boxes, actually, which all affect the follow up date.

This is the existing code which works fine, just doesn't exclude weekends or holidays.

Private Sub Checkdaysuntilf ollowup_Click()
If CheckDaysUntilF ollowup.Value = True Then
[F/U Date].Value = date + [Days Until Follow Up]
ElseIf CheckDaysUntilF ollowup.Value = False Then
[F/U Date] = Null
End If
End Sub
Feb 8 '10 #1
1 2887
nico5038
3,080 Recognized Expert Specialist
Check out: http://www.mvps.org/access/datetime/date0006.htm
Many fine other samples too :-)

Nic;o)
Feb 9 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4737
by: JP SIngh | last post by:
Hi All I need to calculate the number of working days between the two dates entered on an ASP page. I am not that great a coder in ASP and was wondering if someone can help. Basically the form has Two textboxes to enter dates From Date - Fdate To Date - TDate
1
282
by: Damien | last post by:
Hi I have built a database using Access 2000. For one of the reports I am trying to create I need to calculate working days. I have written code in VB which takes a start date and an end date and has a counter that counts all the weekends and bank holidays and returns the number of working days between the two dates. This all works fine. This code is attached to a text box on a form and when clicked it calculates. My problem is...
4
2537
by: JMCN | last post by:
object invalid or no longer set - confusion of the recordset in access 2003. i am currently converting from access 97 to access 2003. majority of the codes converted over perfectly fine, though my recordset did not. i read from pasts posts that some references will not convert. so i tried to change the dao 3.51 reference to dao 3.6 in access 97. then i imported all of the objects into an access 2003. it did not work. so my second...
2
2204
by: Jannick | last post by:
Help..please! I'm a rookie in terms of VB, but I'm desperately trying to make Access count the number of days between two dates and then subtract the weekends. Can anyone tell me what is wrong with the follwing code: Option Compare Database Public Function WorkingDays(StartDate As Date, EndDate As Date) As Integer
2
3138
by: MLH | last post by:
With a table of holidays and A97's date fn's - how best to count weekends and holidays between two dates? My holiday table has 4 fields. I will be adding records to it each year as info becomes known. What approach would you advise to tally up the number of holidays, saturdays and sundays between any 2 dates in the range of my records in this table?
0
1180
by: psuaudi | last post by:
I have a database that involves moving product from one status to the next. When the status is changed, it saves the date of the change, and from where the product was moved. Ex. of one product moving from one stage to the next. 11/1/06 "Status 1" 11/1/06 "Status 1" 11/2/06 "Status 1" 11/5/06 "Status 1" 11/5/06 "Status 1"
3
1404
by: eskelies | last post by:
I have a rolling cumulative income amount for each day. Right now my query would need me to run it everyday (weekday, weekend or holiday) for it to work. My data looks something like this: Distribution dollar amounts: Today (T) T+1 T+2 300 350 375 These distribution dollar amounts are for Today (T). In my query, I have a cumulative total for the entire month, which I enter into a different system. For...
2
8706
by: rahulae | last post by:
help me with this I'm able to calculate total working days excluding weekends but how to exclude holidays,is there any other way apart from storing all the holidays in some table and not selecting those or else is there any other option
8
25476
by: trixxnixon | last post by:
I know this topic is a veritable dead horse, but I have to ask, because I am unable to find something that is close to my scenario that I can completely understand. I have a start date field and complete date field. I need to know how many days, minus holidays and weekends are between the two dates. i already have the table of holidays named "holiday table" with the field being named "Holidaydate". I need this to output a number...
5
24539
FishVal
by: FishVal | last post by:
IMHO, the following is not a how-to-do instruction to solve a particular problem but more a concept-proof stuff demonstrating possibilities of SQL. So, let us say the problem is to calculate business days count which is defined as count of days (optionally inclusive in the current implementation) excluding weekend days and holidays. Let us say periods to calculate are stored in table associated with contacts. keyPeriodID -...
0
8312
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8504
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6169
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1622
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.