473,503 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

calculate dateout without weekend days in a form

107 New Member
Hello,
I have a form.
When a user enters item number Date shipped field is filled with current date.
TurnAroundTime is a number field to add the number of days to Date shipped.

DatOut is an unbound textbox on form.
I want DateOut filled with Date shipped + TurnAroundTime.
The turn around time number is static and assigned to Item numbers.

I have tried creating a module and a call in the main form and subforms.
I cannot get the DateOut to display -Date shipped + TurnAroundTime.
I have tried making a field for DateOut also.

The form has already been created and I am modifying it. It has a thousand or so records.The DateOut field already has data in it.
I thought I would make a unbound textbox to display date and just enter it in DateOut field.
any ideas or suggestions?
thank you
Aug 19 '08 #1
3 1968
youmike
69 New Member
It looks as if you should be using the "After Update" event attached to the control that you call "TurnAroundTime". If this is indeed so, don't forget to put the appropriate Requery, Refresh, Repaint after the calculation.

If you want to count weekdays only, you will probably have to include a Do/while loop to examine each day in the time period and count it if it is a weekday. This you would have to test using the Weekday function, counting the days only if the Weekday value is less than 6.

If you need to exclude public holidays as well, this would add another level of complication, which you would have to test by referring each date to a table of public holiday dates and excluding if there is a match.

A final thought - if you need to do this repeatedly, it might be worth writing code in a module, which could be used in a range of situations. In this case, you would need to pass parameters to and from the module using global constants.
Aug 19 '08 #2
buddyr
107 New Member
thank you,
unfortunately, I am hitting a block with the TurnAroundTime.I stumbled upon somthing like you said - using refresh- but then I had problems and still null values errors- main problem did not have handle on what I was doing.
can you be any more specific?
thank you
Aug 19 '08 #3
buddyr
107 New Member
am going to try to make a clearer question- thank you for your help here
Aug 20 '08 #4

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

Similar topics

2
4724
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...
2
3456
by: AdityaK | last post by:
Is there anyway I can get weekend date for a given date using DB2 query? I couldn't find any DB2 function that can be used to do so. Thanks, Aditya
6
27935
by: carl.barrett | last post by:
Hi, I have a continuous form based on a query ( I will also be creating a report based on the same query). There are 2 fields: Date Obtained and Date Of Expiry I want a further 3 columns...
7
25966
by: Sam | last post by:
Hi, I use C# in my ASP.NET projects. Here's what I need to do: I want to add x business days to a given date i.e. add 12 business days to today's date. What is the best, fastest and most...
3
5942
by: Libber39 | last post by:
Hi everyone, Have a query on how to calculate the amount of weeks and days contained in a number in an access query. ie: the difference in days between 2 dates amounts to 17 days. I want to now...
2
1936
by: Mike | last post by:
Is there a way to calculate the total number of weekdays when provided a date? Example: If I have a start date of 7/11/2008 and I want to go out 10 days, I want to get this: 6 weekdays 4...
11
2484
by: Connie via AccessMonster.com | last post by:
Hi Access Building Friends, I am building a database for a manufacturer who needs to know the projected End_Date of each job. I know the Start_Date and the total days required to do the job. ...
7
3211
by: Mike | last post by:
I have a routine that's calculating business days but its not counting the weekend days that are between the start date and end date. If my start date is 9/26/08 and my end date is 10/01/08, I...
5
24524
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...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7291
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,...
0
7357
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...
1
7012
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...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5023
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...
0
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
402
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...

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.