MS ACCESS query prompts for date range

Hi,
  I have a query in ACCESS. As you see in attached screenshots,   the design view of query doesn't show any date field or anything that would prompt for begin and end dates, but it does ask those two input values for it to run.

Thanks.
ACCESS-Query.docx
sgleeAsked:
Who is Participating?
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Connect With a Mentor Database ArchitectCommented:
Or Salesman Na ...   if that is a query?

Pretty much has to be in one of these queries ...
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
What about in the NSales by slm# ... query ?
0
 
mbizupCommented:
Look at your query in SQL view - the dates may be listed as parameters.

You can also see  parameters by clicking the "Parameters" button in the ribbon above the query designer.
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
sgleeAuthor Commented:
Here is the SQL view of the query:

SELECT DISTINCTROW [Salesman Names].[salesman name], [NSales by slm#/cust/sum of gp].CUSTNO, [NSales by slm#/cust/sum of gp].[CUST NAME], [NSales by slm#/cust/sum of gp].SumOfGM, [NSales by slm#/cust/sum of gp].SumOfEXTSALE, [nSales by slm#/cust/sum of gp]!SumOfGM/[nSales by slm#/cust/sum of gp]!SumOfEXTSALE AS Expr1, [NSales by slm#/cust/sum of gp].CUSTNO, [NSales by slm#/cust/sum of gp].[LastOfship-ste]
FROM [NSales by slm#/cust/sum of gp] INNER JOIN [Salesman Names] ON [NSales by slm#/cust/sum of gp].[SLM#] = [Salesman Names].[salesman #];
0
 
Dale FyeCommented:
You also have a field (identified by Expr1) which obviously does not have the correct field name.
0
 
sgleeAuthor Commented:
Here is full description of that field. But no error from that ...

Expr1: [nSales by slm#/cust/sum of gp]!SumOfGM/[nSales by slm#/cust/sum of gp]!SumOfEXTSALE
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Connect With a Mentor Database ArchitectCommented:
"You also have a field (identified by Expr1) which obviously does not have the correct field name. "
It's literally ... and Expression ...w/o an alias ...

Post the SQL for NSales by slm# ... query
0
 
sgleeAuthor Commented:
I just spoke to the original designer and he showed me that this particular query (that I posted) uses another query that may include another query ... so on so forth.
So I need to go back to the name of the query used in this query to find out which query is asking dates.

Thanks for all of your help.
0
 
Dale FyeConnect With a Mentor Commented:
I assume, as databaseMX did, that [nSales by slm#/cust/sum of gp] is a query.

Did you open up that query in design view and check it out?

The other thing you might want to check is that the query does not have any parameters defined.  If it does, they will be visible in the first line (or two) of the SQL view of the query.
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Connect With a Mentor Database ArchitectCommented:
"uses another query that may include another query ... so on so forth."

Which is why I suggested look at the other query(s) showing in the query designer. One is a query for sure, can't tell if the other is a table or query.  And of course, the one query may include more ...

mx
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
So, what was the solution ?
0
 
sgleeAuthor Commented:
The user who created that query told me that the query is based on the result from another query which is based on the result from another query.
So there were total 3 queries involved: Query1  Query2  Query3(this is the one that I posted SQL for). I kept opening other queries (like NSales by slm#/cust/sum of gp) and eventually found that Query1 had Begin Date and End Date prompt.

Thanks for your help.
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Excellent.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.