between date and dateadd query

M

Maax

Hi all, I have just noticed that when i use the following query it is showing
all results and disregarding the date. I am 99% sure this worked in the past
and have not edited the query. The only thing that has changed is that we are
now in the year 2008. I use the following,
Between Date() And DateAdd("d",[Enter Number of Days to Expiration],Date())
Or >Now()
This lets me enter a number and the report returns records thatare due
within todays date plus the number of days i type in.
I am sure this worked until the year actually changed to 2008, is this
possible?

any help appreciated.
 
M

MGFoster

Maax said:
Hi all, I have just noticed that when i use the following query it is showing
all results and disregarding the date. I am 99% sure this worked in the past
and have not edited the query. The only thing that has changed is that we are
now in the year 2008. I use the following,
Between Date() And DateAdd("d",[Enter Number of Days to Expiration],Date())
Or >Now()
This lets me enter a number and the report returns records thatare due
within todays date plus the number of days i type in.
I am sure this worked until the year actually changed to 2008, is this
possible?

any help appreciated.


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

That criteria says:

"any date between today's date and today's date plus X"
OR
"any date on, and after, today's date"

Which means it's going to get any record that has a due date on, and
after, today's date. Is that what you want?

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBR7bCrIechKqOuFEgEQJ26gCglmNyB5FRBFHfqrSSW3T5uthrxhUAn2PK
grZ+6rsezYcvKe64mscmdhJP
=NlVn
-----END PGP SIGNATURE-----
 
M

Maax

Hi , no, i want the records to only be returned for between todays date and
todays date plus the number of days i enter in to the query.

When i run the report i get a box that asks me to enter a number of days. if
i enter 7, i want all the records due within the next 7 days only.

thanks


MGFoster said:
Maax said:
Hi all, I have just noticed that when i use the following query it is showing
all results and disregarding the date. I am 99% sure this worked in the past
and have not edited the query. The only thing that has changed is that we are
now in the year 2008. I use the following,
Between Date() And DateAdd("d",[Enter Number of Days to Expiration],Date())
Or >Now()
This lets me enter a number and the report returns records thatare due
within todays date plus the number of days i type in.
I am sure this worked until the year actually changed to 2008, is this
possible?

any help appreciated.


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

That criteria says:

"any date between today's date and today's date plus X"
OR
"any date on, and after, today's date"

Which means it's going to get any record that has a due date on, and
after, today's date. Is that what you want?

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBR7bCrIechKqOuFEgEQJ26gCglmNyB5FRBFHfqrSSW3T5uthrxhUAn2PK
grZ+6rsezYcvKe64mscmdhJP
=NlVn
-----END PGP SIGNATURE-----
 
M

Maax

I think i have spotted the problem. if i change the Or >Now() to Or <Now().
Will this give me every thing that is due before today and everything due up
until todays date plus X ?



MGFoster said:
Maax said:
Hi all, I have just noticed that when i use the following query it is showing
all results and disregarding the date. I am 99% sure this worked in the past
and have not edited the query. The only thing that has changed is that we are
now in the year 2008. I use the following,
Between Date() And DateAdd("d",[Enter Number of Days to Expiration],Date())
Or >Now()
This lets me enter a number and the report returns records thatare due
within todays date plus the number of days i type in.
I am sure this worked until the year actually changed to 2008, is this
possible?

any help appreciated.


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

That criteria says:

"any date between today's date and today's date plus X"
OR
"any date on, and after, today's date"

Which means it's going to get any record that has a due date on, and
after, today's date. Is that what you want?

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBR7bCrIechKqOuFEgEQJ26gCglmNyB5FRBFHfqrSSW3T5uthrxhUAn2PK
grZ+6rsezYcvKe64mscmdhJP
=NlVn
-----END PGP SIGNATURE-----
 
M

MGFoster

That's correct. But, do you want EVERYTHING before today's date?
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **
I think i have spotted the problem. if i change the Or >Now() to Or <Now().
Will this give me every thing that is due before today and everything due up
until todays date plus X ?



MGFoster said:
Maax said:
Hi all, I have just noticed that when i use the following query it is showing
all results and disregarding the date. I am 99% sure this worked in the past
and have not edited the query. The only thing that has changed is that we are
now in the year 2008. I use the following,
Between Date() And DateAdd("d",[Enter Number of Days to Expiration],Date())
Or >Now()
This lets me enter a number and the report returns records thatare due
within todays date plus the number of days i type in.
I am sure this worked until the year actually changed to 2008, is this
possible?

any help appreciated.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

That criteria says:

"any date between today's date and today's date plus X"
OR
"any date on, and after, today's date"

Which means it's going to get any record that has a due date on, and
after, today's date. Is that what you want?

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBR7bCrIechKqOuFEgEQJ26gCglmNyB5FRBFHfqrSSW3T5uthrxhUAn2PK
grZ+6rsezYcvKe64mscmdhJP
=NlVn
-----END PGP SIGNATURE-----
 
M

Maax

Hi, Yes I have another filter that will only show records that are not
complete. Therefore these records will be overdue. I may remove this as i
already have a report that shows overdue.

many thanks.

MGFoster said:
That's correct. But, do you want EVERYTHING before today's date?
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **
I think i have spotted the problem. if i change the Or >Now() to Or <Now().
Will this give me every thing that is due before today and everything due up
until todays date plus X ?



MGFoster said:
Maax wrote:
Hi all, I have just noticed that when i use the following query it is showing
all results and disregarding the date. I am 99% sure this worked in the past
and have not edited the query. The only thing that has changed is that we are
now in the year 2008. I use the following,
Between Date() And DateAdd("d",[Enter Number of Days to Expiration],Date())
Or >Now()
This lets me enter a number and the report returns records thatare due
within todays date plus the number of days i type in.
I am sure this worked until the year actually changed to 2008, is this
possible?

any help appreciated.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

That criteria says:

"any date between today's date and today's date plus X"
OR
"any date on, and after, today's date"

Which means it's going to get any record that has a due date on, and
after, today's date. Is that what you want?

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
** Respond only to this newsgroup. I DO NOT respond to emails **

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBR7bCrIechKqOuFEgEQJ26gCglmNyB5FRBFHfqrSSW3T5uthrxhUAn2PK
grZ+6rsezYcvKe64mscmdhJP
=NlVn
-----END PGP SIGNATURE-----
 
R

raskew via AccessMonster.com

Your Or >Now() negates any date selections in the future.

Bob
Hi, Yes I have another filter that will only show records that are not
complete. Therefore these records will be overdue. I may remove this as i
already have a report that shows overdue.

many thanks.
That's correct. But, do you want EVERYTHING before today's date?
I think i have spotted the problem. if i change the Or >Now() to Or <Now(). [quoted text clipped - 25 lines]
Which means it's going to get any record that has a due date on, and
after, today's date. Is that what you want?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

query on date 1
dateadd query 3
Incorrect years being returned on action query 3
Date Range in Query using DateAdd 4
DateAdd Function 9
DateAdd Working Day Query 7
Dateadd function 1
Help with small result type 2

Top