A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query records that expire (date) in XX days



 
 
Thread Tools Display Modes
  #1  
Old August 18th, 2006, 01:55 AM posted to microsoft.public.access.queries
4saken
external usenet poster
 
Posts: 9
Default Query records that expire (date) in XX days

I have a table that holds a field called "Expiration Date." On the query, how
can I get a pop up that prompts the user to enter the number of days left
before the date equals today's date? For example, we want to see all the
records that will expire within 60 days. How exactly do I get this?
  #2  
Old August 18th, 2006, 02:32 AM posted to microsoft.public.access.queries
fredg
external usenet poster
 
Posts: 4,386
Default Query records that expire (date) in XX days

On Thu, 17 Aug 2006 17:55:01 -0700, 4saken wrote:

I have a table that holds a field called "Expiration Date." On the query, how
can I get a pop up that prompts the user to enter the number of days left
before the date equals today's date? For example, we want to see all the
records that will expire within 60 days. How exactly do I get this?


As criteria on the ExpirationDate field:
Between Date() and Date() + 60

or you can use ...
Between Date() and DateAdd("d",60,Date())
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #3  
Old August 18th, 2006, 01:21 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Query records that expire (date) in XX days

If you want the user to be able to enter a variable number of days, you can
modify that to

As criteria on the ExpirationDate field:
Between Date() and DateAdd("d",[Enter Number of Days to Expiration],Date())

"fredg" wrote in message
.. .
On Thu, 17 Aug 2006 17:55:01 -0700, 4saken wrote:

I have a table that holds a field called "Expiration Date." On the query,
how
can I get a pop up that prompts the user to enter the number of days left
before the date equals today's date? For example, we want to see all the
records that will expire within 60 days. How exactly do I get this?


As criteria on the ExpirationDate field:
Between Date() and Date() + 60

or you can use ...
Between Date() and DateAdd("d",60,Date())
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail



  #4  
Old August 20th, 2006, 10:58 PM posted to microsoft.public.access.queries
4saken
external usenet poster
 
Posts: 9
Default Query records that expire (date) in XX days

Thanks for the replies!

"John Spencer" wrote:

If you want the user to be able to enter a variable number of days, you can
modify that to

As criteria on the ExpirationDate field:
Between Date() and DateAdd("d",[Enter Number of Days to Expiration],Date())

"fredg" wrote in message
.. .
On Thu, 17 Aug 2006 17:55:01 -0700, 4saken wrote:

I have a table that holds a field called "Expiration Date." On the query,
how
can I get a pop up that prompts the user to enter the number of days left
before the date equals today's date? For example, we want to see all the
records that will expire within 60 days. How exactly do I get this?


As criteria on the ExpirationDate field:
Between Date() and Date() + 60

or you can use ...
Between Date() and DateAdd("d",60,Date())
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail




  #5  
Old July 22nd, 2008, 11:47 PM posted to microsoft.public.access.queries
Todd
external usenet poster
 
Posts: 377
Default Query records that expire (date) in XX days

I am trying about the same thing here, but when I put anything into the
criteria, I get a popup with one of the names from a field that I use in the
query. If I put anything or nothing into the popup, I get no records
returned when I run the query.

Thanks

"fredg" wrote:

On Thu, 17 Aug 2006 17:55:01 -0700, 4saken wrote:

I have a table that holds a field called "Expiration Date." On the query, how
can I get a pop up that prompts the user to enter the number of days left
before the date equals today's date? For example, we want to see all the
records that will expire within 60 days. How exactly do I get this?


As criteria on the ExpirationDate field:
Between Date() and Date() + 60

or you can use ...
Between Date() and DateAdd("d",60,Date())
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

  #6  
Old July 23rd, 2008, 01:57 AM posted to microsoft.public.access.queries
smartin
external usenet poster
 
Posts: 780
Default Query records that expire (date) in XX days

Todd wrote:
I am trying about the same thing here, but when I put anything into the
criteria, I get a popup with one of the names from a field that I use in the
query. If I put anything or nothing into the popup, I get no records
returned when I run the query.

Thanks

"fredg" wrote:

On Thu, 17 Aug 2006 17:55:01 -0700, 4saken wrote:

I have a table that holds a field called "Expiration Date." On the query, how
can I get a pop up that prompts the user to enter the number of days left
before the date equals today's date? For example, we want to see all the
records that will expire within 60 days. How exactly do I get this?

As criteria on the ExpirationDate field:
Between Date() and Date() + 60

or you can use ...
Between Date() and DateAdd("d",60,Date())
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail


What is the name of the field in the popup? Is it a reserved word, or
are you using "Date" (a reserved word) as a field name somewhere?
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.