473,287 Members | 1,813 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,287 software developers and data experts.

Query Problem???

For the Past few days I have been trying to create Query, and
everyone I have asked have been obtuse with the help. I am a new to
access and still learning, so it is probably that stops me from
understanding.

What I want - I have a query that is designed to display task
deadlines to the user. It should display all the deadlines that are
due in, over the next 2 weeks. The deadlineDate is made up of
Days/Months/Year, then along with that, there was a task name and
brief description of the task. What should then happen is when the
query is run, it will check the current date on the computer, then
compare that date to all the deadlineDate's. Then if any of those
dates are 14 days or less to the current date, it will display those
tasks. Deadlines that have past should not be displayed!!!

What I did was create all the fields, which was no problem. Then
under the deadlineDate in the criteria section I put;

"<=Date()+14"

But the data that is displayed is not what I want. Some of the data
displayed was wrong by 2 months!!!

Can anyone help me???

Richard
Nov 13 '05 #1
2 1308
Hi Richard,

If you don't want tasks with old deadlines to display, you need to
change your criteria to:

Between Date() and Date()+14

IF that still doesn't work, let us know more detail. For example, what
do you mean by "...the data displayed was wrong by 2 months"?

Good luck,
------------
LoopyNZ
------------

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #2
Something isn't right with your date math.

You are storing your deadline dates in a Date field, right? (and not a
text/char field)

If so, you probably want to do a query like this:

select *
from deadlines
where deadline between date() and date()+14

If you're gonna have a lot of records, create an index on the Deadline
field...

Richard New to Access wrote:
For the Past few days I have been trying to create Query, and
everyone I have asked have been obtuse with the help. I am a new to
access and still learning, so it is probably that stops me from
understanding.

What I want - I have a query that is designed to display task
deadlines to the user. It should display all the deadlines that are
due in, over the next 2 weeks. The deadlineDate is made up of
Days/Months/Year, then along with that, there was a task name and
brief description of the task. What should then happen is when the
query is run, it will check the current date on the computer, then
compare that date to all the deadlineDate's. Then if any of those
dates are 14 days or less to the current date, it will display those
tasks. Deadlines that have past should not be displayed!!!

What I did was create all the fields, which was no problem. Then
under the deadlineDate in the criteria section I put;

"<=Date()+14"

But the data that is displayed is not what I want. Some of the data
displayed was wrong by 2 months!!!

Can anyone help me???

Richard

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Wescotte | last post by:
Here is a small sample program I wrote in PHP (running off Apache 1.3.31 w/ PHP 5.0.1) to help illustrates problem I'm having. The data base is using DB2 V5R3M0. The client is WinXP machine using...
3
by: Brian Oster | last post by:
After applying security patch MS03-031 (Sql server ver 8.00.818) a query that used to execute in under 2 seconds, now takes over 8 Minutes to complete. Any ideas on what the heck might be going...
1
by: Jeff Blee | last post by:
I hope someone can help me get this graph outputing in proper order. After help from Tom, I got a graph to display output from the previous 12 months and include the average of that output all in...
8
by: Adam Louis | last post by:
I would like help resolving this problem. I'm a novice who's been hired to query a hospital database and extract useful information, available to me only in a dynamically generated, downloadable...
6
by: Martin Lacoste | last post by:
Ok, before I headbutt the computer... don't know why when I add criteria in a query, I get an 'invalid procedure call'. I also don't know why after searching the help in access, the various access...
4
by: Apple | last post by:
1. I want to create an autonumber, my requirement is : 2005/0001 (Year/autonumber), which year & autonumber no. both can auto run. 2. I had create a query by making relation to a table & query,...
11
by: Andy_Khosravi | last post by:
My problem: I'm having trouble with a query taking much too long to run; a query without any criteria evaluating only 650 records takes over 300 seconds to run (over the network. On local drive...
4
by: Konrad Hammerer | last post by:
Hi! I have the following problem: I have a query (a) using another query (b) to get the amount of records of this other query (b), means: select count(MNR) as Number from...
4
by: Stan | last post by:
I am using MS Office Access 2003 (11.5614). My basic question is can I run a query of a query datasheet. I want to use more that one criteria and can not get that query to work. I thought I...
2
by: existential.philosophy | last post by:
This is a new problem for me: I have some queries that open very slowly in design view. My benchmark query takes about 20 minutes to open in design view. That same query takes about 20 minutes...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.