Strange Parameter Name Issue

Margarita

Registered User.
Local time
Today, 13:07
Joined
Aug 12, 2011
Messages
185
Hello, I am working in access 2003 and have noticed an odd problem with parameters in one of my queries. The query is pretty straightforward- a simple select statement- and it takes two date parameters- called [startdate] and [enddate]. I should note that I use date parameters in a few other queries and they are called [startdate] and [enddate] as well.

Now, when I name the parameters in this new query by these names [startdate] and [enddate], the query runs without asking me for parameters and simply outputs a blank result. When I change the names of the parameters- to, say, [start date parameter] and [end date parameter]- the parameter input box comes up as it should and I get the expected results for the dates I put in.

It is obviously not a problem for me to change the parameter names - but I would appreciate anyone's suggestions as to what may be going on to cause this issue. I really want to understand the problem from the inside so I can avoid it next time.
Thank you!
 
Offhand I'd suspect that somewhere in the table(s)/query(ies) in the FROM clause those exist as fields. It will always look to see if the bracketed text is a field; it only prompts when it can't find it.
 
Doh! Now I feel really stupid! You are absolutely right- I did in fact have fields called just that in one of the tables- and that wasn't an issue in the other parameter queries because they involved only select sub-queries that did not select those fields in particular. Thanks again! Sorry for the silly thread!
 
Happy to help! Learning is never silly.
 

Users who are viewing this thread

Back
Top Bottom