Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query opening blank when begin and end dates are entered

Status
Not open for further replies.

dragongunner0351

Programmer
Mar 16, 2006
104
US
Hello all, I've made a query to view sales orders by a particular date. In the OrderDate field I have this listed under criteria: Between [Begin Date] And [End Date].

For some reason if I don't put in a date I can view a report that shows me all sales orders, but if I put in a date I don't see any sales orders.

Any assitance offered will be greatly appreciated. In the meantime I'm going to continue searching the queries forum and see if I can view any relevant posts.
 



How are you entering your begin and end dates? Remember that DATES are not STRINGS and a STRING must be converted to a DATE, which is what the # delimiter does.

Skip,

[glasses] [red][/red]
[tongue]
 
the criteria is limiting the records returned to only those records where the OrderDate is between [Begin Date] And [End Date]

if you've got no records with OrderDate between those 2 dates, then the query won't return any results. You could try to but in a bigger date range to try to return more results.

if you want to view orders on a particular date, your criteria should be = [date] not between...


--------------------
Procrastinate Now!
 
To answer the first response the dates are entered as 04/12/07

Crowley16 I will chg my criteria to what you have suggested =[date], also I did try a variety of date ranges.
 
Here is some more info that may be relevant:
in the orders table the field properties for the OrderDate field is:
FORMAT Short Date
DEFAULT VALUE =(Now0
VALIDATION RULE >=#1/1/1900#
VALIDATION TEXT Date must be greater than 1/1/1900

Also, Crowley16 your =[Date] suggestion had no effect.
 
You may try this:[tt]
Expression cell Order Date: Int(OrderDate)
Criteria cell Between [Begin Date] And [End Date][/tt]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Sorry for the delay in responding I just returned from a staff meeting, thank you for the posts I will try each
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top