Query beginning and end dates

D

Diane

I have a field called DateOut in a query. If I prompt that
field to ask me the beginning and end dates, it returns
all the dates. What am I doing wrong?
 
J

John Vinson

I have a field called DateOut in a query. If I prompt that
field to ask me the beginning and end dates, it returns
all the dates. What am I doing wrong?

I don't have any idea. Care to tell us what you are doing?

Please open the Query in SQL view and post the SQL here. That will
give us a chance to diagnose the problem.
 
D

Diane

Here is the SQL view for that field:
SELECT tblProposals.[SAM Proposal No], tblProposals.
[Revision No], tblProposals.[RFQ No],
tblProposals.Customer, tblCustomerList.City,
tblIndustryClassification.ClassificationName, tblProposals.
[RFQ Date In], tblProposals.[Date Out], tblProposals.
[Follow-up], tblProposals.Principal, tblProposals.
[Principal's Division], tblProposals.Description,
tblProposals.[Proposal Type], tblProposals.Value,
tblProposals.Currency, tblProposals.[SAM Responsible],
tblProposals.Status, tblProposals.Comments,
tblCustomerList.[Customer Industry]
FROM tblOffice RIGHT JOIN (tblIndustryClassification RIGHT
JOIN (tblCustomerList RIGHT JOIN tblProposals ON
tblCustomerList.Customer = tblProposals.Customer) ON
tblIndustryClassification.ClassificationName =
tblCustomerList.[Customer Industry]) ON tblOffice.Office =
tblCustomerList.Office
WHERE (((tblProposals.[Date Out])>=[Enter the beginning
date:]) AND ((tblProposals.Principal) Like ([Enter
Principal]) & "*") AND ((tblProposals.[SAM Responsible])
Like ([Enter SAM Rep]) & "*") AND ((([tblProposals].[Date
Out])<=[Enter the end date:]) Is Null)) OR (((tblProposals.
[SAM Responsible]) Like ([Enter SAM Rep]) & "*")) OR
(((tblProposals.[SAM Responsible]) Like ([Enter SAM Rep])
& "*"))
ORDER BY tblProposals.Customer;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top