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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Won't let me enter date 1

Status
Not open for further replies.
Oct 18, 2004
13
My database will not let me enter dates for any query or report where this is in the criteria:

Code:
Between [Enter Start Date (Like MM/DD/YYYY)] And [Enter End Date (Like MM/DD/YYYY)]

All I get is beeps. If I click on ok for start and end date, it opens the query and report with no data. What do I have set wrong?

Thank You so Much,
NewCMISGRad
 
Sorry. I had my input mask messed up somehow. I deleted it and started over and they all work fine. I always find the answer just after I post something.

Thank You so Much,
NewCMISGRad
 
I have a query and I am trying to find the following. I need the query to prompt the user for the month the report should be pulled. I need it to return any contract that was received before the end date of that month AND not completed. Also, it should pull in any contract that was completed only within that month. When I run my query I'll get the current months contracts even though I am pulling a report for a prior month. Please help. I hope what I am asking is clear for someone to understand. Thanks!

This is what I have so far:
SELECT [Select Union Query_1].Customer, [Select Union Query_1].[Date Received], [Select Union Query_1].[Date Completed/Implemented], [Select Union Query_1].Type, [Select Union Query_1].Regions, [Select Union Query_1].Requestor, [Select Union Query_1].Description, [Select Union Query_1].[Turnaround Time], [Select Union Query_1].[Number Of Redlines], [Select Union Query_1].[Awaiting Signature], [Select Union Query_1].Status
FROM [Select Union Query] AS [Select Union Query_1]
WHERE ((([Select Union Query_1].[Date Completed/Implemented]) Between [enter start date] And [enter end date]) AND (([Select Union Query_1].[Is This A Contract?])=Yes));
 
Is it returning records with [Select Union Query_1].[Date Completed/Implemented] outside of the date range you are entering?

traingamer
 
I don't know why it was pulling in dates outside the range but when I re-entered the between prompt that part pulled in correctly.

But I still have a problem: When I run it currently it will pull in only Completed/Implemented contracts within the date range specified. But I want it also to pull in any contracts Received prior to that date that are Not completed.

Thanks in advance for any suggestions you might have.
 
Play with the OR operator:
WHERE [Is This A Contract?]=Yes AND ([Date Completed/Implemented] Between [enter start date] And [enter end date] OR ([Date Received]<=[enter end date] AND [Date Completed/Implemented] Is Null));

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top