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  

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 16th, 2005, 10:27 PM
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 16th, 2005, 10:49 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default

Simply put [From] and [To] (complete with the square brackets) as the
criteria for your query.

Note that if your date field has times associated with it (such as it will
if you used the Now() function to populate the field, rather than the Date()
function), you'll probably want DateAdd("d", 1, [To])

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Ralph Malph" wrote in message
...
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 18th, 2005, 05:21 AM
Ralph Malph
external usenet poster
 
Posts: n/a
Default

On Sat, 16 Apr 2005 17:49:46 -0400, "Douglas J. Steele"
wrote:

Simply put [From] and [To] (complete with the square brackets) as the
criteria for your query.

Note that if your date field has times associated with it (such as it will
if you used the Now() function to populate the field, rather than the Date()
function), you'll probably want DateAdd("d", 1, [To])


 




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 06: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 08:35 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.