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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

REQ: Need Criteria expression that will ask for "from" and "to" dates and then select records that fall within that date span for access 2000 Please...TIA



 
 
Thread Tools Display Modes
  #1  
Old April 17th, 2005, 05:15 AM
Ralph Malph
external usenet poster
 
Posts: n/a
Default REQ: Need Criteria expression that will ask for "from" and "to" dates and then select records that fall within that date span for access 2000 Please...TIA

I have a query that that prints a bunch of payment records. I need to
beable to print just the records with in a specific time frame. I can
do it if I hard code the date range into the query, but I want it to
ask me for the start date and end date, so I need a criteria
expression that will ask for "from" and "to" dates and then select
records that fall within that date span for access 2000 please. Thanks
for helping in advance.

Ralph Malph
  #2  
Old April 17th, 2005, 06:59 AM
Neil
external usenet poster
 
Posts: n/a
Default

Ralph

In the query criteria type the following exactly:

Between [Start Date] and [End Date]

This will bring up two seperate dialog boxes asking for the start and end
date, if you want to change the wording, use some thing different between the
square brackets.

HTH

Neil

www.nwarwick.co.uk

"Ralph Malph" wrote:

I have a query that that prints a bunch of payment records. I need to
beable to print just the records with in a specific time frame. I can
do it if I hard code the date range into the query, but I want it to
ask me for the start date and end date, so I need a criteria
expression that will ask for "from" and "to" dates and then select
records that fall within that date span for access 2000 please. Thanks
for helping in advance.

Ralph Malph

  #3  
Old April 17th, 2005, 07:17 AM
Tom Wickerath
external usenet poster
 
Posts: n/a
Default

Hi Ralph,

Use a criteria like this in your date field:

Between [Enter Start Date] And [Enter End Date]

One word of caution: If the dates entered in your database contain a time
component, then you may miss a record that occurs on the ending date. The
Date/Time datatype is saved as a number, with the integer portion
representing the time of day. For example, April 16, 2005 at 9:00 PM is
actually saved in the table as 38458.875. If the ending date that you enter
is April 16, 2005, the integer portion will equal zero. Thus the record at
9:00 PM on the same day would be greater in value than the criteria entered.
If you have a time component included, then modify the criteria as follows:

=[Enter Start Date] And DateAdd("d",1,[Enter End Date])


Rather than use a parameter query, you might want to use a form instead. You
can enter the two dates into textboxes on the form. When you click an OK
button, to run the report, you hide the form. The query's criteria looks to
the open form to pick up the date values. This will also provide an easy way
for you to print the from and to dates on the report, since you can grab them
from the hidden, but still open, form.

If you'd like a working example, send me a private e-mail message. Please do
not post your e-mail address to a reply in any newsgroup (unless you love the
idea of getting spammed to death).

Tom

QWCaos168@XScom cas t . Dnet (---Remove all capitolized letters and
spaces).

________________________________________

"Ralph Malph" wrote:

I have a query that that prints a bunch of payment records. I need to
beable to print just the records with in a specific time frame. I can
do it if I hard code the date range into the query, but I want it to
ask me for the start date and end date, so I need a criteria
expression that will ask for "from" and "to" dates and then select
records that fall within that date span for access 2000 please. Thanks
for helping in advance.

Ralph Malph
  #4  
Old April 18th, 2005, 12:49 AM
Ralph Malph
external usenet poster
 
Posts: n/a
Default

Thanks Tom !!!! will contact you via e-mail directly....THANKS again
!!!!


On Sat, 16 Apr 2005 23:17:02 -0700, "Tom Wickerath" AOS168 AT
@comcast DOT net wrote:

Hi Ralph,

Use a criteria like this in your date field:

Between [Enter Start Date] And [Enter End Date]

One word of caution: If the dates entered in your database contain a time
component, then you may miss a record that occurs on the ending date. The
Date/Time datatype is saved as a number, with the integer portion
representing the time of day. For example, April 16, 2005 at 9:00 PM is
actually saved in the table as 38458.875. If the ending date that you enter
is April 16, 2005, the integer portion will equal zero. Thus the record at
9:00 PM on the same day would be greater in value than the criteria entered.
If you have a time component included, then modify the criteria as follows:

=[Enter Start Date] And DateAdd("d",1,[Enter End Date])


Rather than use a parameter query, you might want to use a form instead. You
can enter the two dates into textboxes on the form. When you click an OK
button, to run the report, you hide the form. The query's criteria looks to
the open form to pick up the date values. This will also provide an easy way
for you to print the from and to dates on the report, since you can grab them
from the hidden, but still open, form.

If you'd like a working example, send me a private e-mail message. Please do
not post your e-mail address to a reply in any newsgroup (unless you love the
idea of getting spammed to death).

Tom

QWCaos168@XScom cas t . Dnet (---Remove all capitolized letters and
spaces).

________________________________________

"Ralph Malph" wrote:

I have a query that that prints a bunch of payment records. I need to
beable to print just the records with in a specific time frame. I can
do it if I hard code the date range into the query, but I want it to
ask me for the start date and end date, so I need a criteria
expression that will ask for "from" and "to" dates and then select
records that fall within that date span for access 2000 please. Thanks
for helping in advance.

Ralph Malph


  #5  
Old April 18th, 2005, 04:10 AM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Sun, 17 Apr 2005 04:15:24 GMT, Ralph Malph
wrote:

I have a query that that prints a bunch of payment records. I need to
beable to print just the records with in a specific time frame. I can
do it if I hard code the date range into the query, but I want it to
ask me for the start date and end date, so I need a criteria
expression that will ask for "from" and "to" dates and then select
records that fall within that date span for access 2000 please. Thanks
for helping in advance.

Ralph Malph


Simply use a criterion of

BETWEEN [Enter start date:] AND [Enter end date:]


John W. Vinson[MVP]
  #6  
Old April 18th, 2005, 05:15 AM
Ralph Malph
external usenet poster
 
Posts: n/a
Default

On Sat, 16 Apr 2005 22:59:01 -0700, "Neil"
wrote:

Ralph

In the query criteria type the following exactly:

Between [Start Date] and [End Date]

This will bring up two seperate dialog boxes asking for the start and end
date, if you want to change the wording, use some thing different between the
square brackets.

HTH

Neil

www.nwarwick.co.uk

"Ralph Malph" wrote:

I have a query that that prints a bunch of payment records. I need to
beable to print just the records with in a specific time frame. I can
do it if I hard code the date range into the query, but I want it to
ask me for the start date and end date, so I need a criteria
expression that will ask for "from" and "to" dates and then select
records that fall within that date span for access 2000 please. Thanks
for helping in advance.

Ralph Malph


  #7  
Old April 18th, 2005, 05:17 AM
Ralph Malph
external usenet poster
 
Posts: n/a
Default

On Sun, 17 Apr 2005 21:10:43 -0600, John Vinson
wrote:

On Sun, 17 Apr 2005 04:15:24 GMT, Ralph Malph
wrote:

I have a query that that prints a bunch of payment records. I need to
beable to print just the records with in a specific time frame. I can
do it if I hard code the date range into the query, but I want it to
ask me for the start date and end date, so I need a criteria
expression that will ask for "from" and "to" dates and then select
records that fall within that date span for access 2000 please. Thanks
for helping in advance.

Ralph Malph


Simply use a criterion of

BETWEEN [Enter start date:] AND [Enter end date:]


John W. Vinson[MVP]


  #8  
Old April 19th, 2005, 03:49 AM
Ralph Malph
external usenet poster
 
Posts: n/a
Default

Tom,

THANK you very much for the sample DBs. I can see a way to do what I
want with these examples.

Thanks again !!!!!!

Ralph Malph

  #9  
Old April 19th, 2005, 07:36 AM
Tom Wickerath
external usenet poster
 
Posts: n/a
Default

You're welcome. Glad I could help.

Tom
_____________________________________

"Ralph Malph" wrote:

Tom,

THANK you very much for the sample DBs. I can see a way to do what I
want with these examples.

Thanks again !!!!!!

Ralph Malph
 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Data type mismatch in criteria expression. ian Running & Setting Up Queries 2 December 13th, 2004 05:45 PM
Writing Criteria Expression amyfinlay Running & Setting Up Queries 1 October 15th, 2004 03:24 AM
Data type mismatch in criteria expression Tcs Running & Setting Up Queries 2 October 8th, 2004 08:05 PM


All times are GMT +1. The time now is 10:41 AM.


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