473,396 Members | 2,036 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to include condition for Date field?

Hi ppl,

I would like to know how to provide condition for Date fields. i wanna do something like this:

i have a field named 'FinishJob' in tableJob (with a drop-down menu with values like "10 days", "14 days", "20 days"). Every job has the field "JobStartDate".

If the JobStartDate is on 20/07/2007 and the 'FinishJob' is 10 days, then the Job has to be completed on 30/07/2007.

I wanna know how to prompt the user abt the Jobs to be finished within 5 days.

When i Press a Button "Check for Job List", it should list all the jobs which are to be completed within the next five days.

Could anyone assist me in this regard.

thanks,
Kathy
Jul 20 '07 #1
5 1813
Rabbit
12,516 Expert Mod 8TB
Is FinishJob the number of days or is it the date it needs to be finished?
Jul 20 '07 #2
hyperpau
184 Expert 100+
Hi ppl,

I would like to know how to provide condition for Date fields. i wanna do something like this:

i have a field named 'FinishJob' in tableJob (with a drop-down menu with values like "10 days", "14 days", "20 days"). Every job has the field "JobStartDate".

If the JobStartDate is on 20/07/2007 and the 'FinishJob' is 10 days, then the Job has to be completed on 30/07/2007.

I wanna know how to prompt the user abt the Jobs to be finished within 5 days.

When i Press a Button "Check for Job List", it should list all the jobs which are to be completed within the next five days.

Could anyone assist me in this regard.

thanks,
Kathy
Create a Form that would list all the Jobs to be finished within the next five days when the "check for Job list" is clicked.

This form should be bound to a parameter query.
On the parameter query, insert a new field which uses the DateDiff() function.
then on the criteria of that Field, put =5.
Now the Date diff function calculates the difference in days of the End Date and the Start Date. but the query will only display the items if the difference is "5". There fore the form would also show only those that the query would show.
the query would work behind the scenario, since only the form would be showing when the button is clicked.
Jul 20 '07 #3
thanks for your reply.

FinishDate is the date where the job must be finished.

I need to list all the jobs between the current date and the finish date.

i know it is easy to acheive this but i could come up with a solution.

i appreciate your help.

thanks n regards,
Kathy
Jul 22 '07 #4
Rabbit
12,516 Expert Mod 8TB
Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2. FROM TableName
  3. WHERE DateDiff("d", Date(), FinishJob) <= 5;
  4.  
Jul 23 '07 #5
Thanks a lot for your work..
Am learning new stuffs everyday from this forum.

love,
Kathy
Jul 23 '07 #6

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

Similar topics

4
by: N. David | last post by:
In bash, you can include a variable as part of a filename. For example: date=$(date) cat log.txt > $date"_log.txt" Which, when setting the right options in date, creates a file named...
2
by: seigo | last post by:
I use datetime condition in sql-query. For example: select something from sometable where date between '06/15/04 00:00:00' and '06/15/04 23:59:59' and result on two synchronized servers is...
1
by: son | last post by:
i need some help with my database i'v got a qyery with a field orderdate from a table orders with a condition date, when a user opens a rapport from this query a popupbox is asking for the date of...
16
by: Dixie | last post by:
I have a problem using Dev Ashish's excellent module to concatenate the results of a field from several records into one record. I am using the code to concatenate certain awards onto a...
1
by: wdw1970 | last post by:
Hello Everyone! This is my first post to the forum. --------------------------------------------------------------------------------------------- In my database, I have a continuous...
3
by: Don | last post by:
I've added a Setup and Deployment project to my Visual Studio 2005 Windows Application solution and have several OCX and DLL files that will be installed. But I can't seem to find any examples in...
8
by: ontherun | last post by:
Hi All, I want to include some code for the OnTimer event in my Form "frmDueDateList" But when i open the form in the design view and checked the properties menu, i could not find the OnTimer...
1
by: jwolfley | last post by:
I have two fields that ask for a date: DOrderDate and DExpiration. I would like to set a condition that if someone enters a date in the DOrderDate field but leaves the DExpiration date blank then a...
3
by: gavm360 | last post by:
Hello, im trying to open a form from an dialog box form: the button on the dialog box has this on the onclick event: DoCmd.OpenForm "frmCASES_UNION", acViewNormal, , "MCH_CASECODE = #" &...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.