By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,943 Members | 1,921 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,943 IT Pros & Developers. It's quick & easy.

Query Problem???

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.