Form, but not query demands parameters

Reese

Registered User.
Local time
Today, 03:54
Joined
Jan 13, 2013
Messages
387
(Solved) Form, but not query demands parameters

I have a form that is based on a query. When I run the query just as a query (viewing it as a table) it works without a hitch. When I open the form that is based on it it keeps demanding for parameters from textboxes in a different form. A form that is separate from said query.

I already checked parameters in the query (there are none) and have also checked the Object Dependancies for the query and the form as well as the SQL of the query. I can't find any cause for these parameters in any of these places. Is there something that might be hiding elsewhere in the form?

This is almost the same to a previous problem I had but the solutions that I were led to in that thread (namely the Object Dependencies & SQL) don't seem to work here. Any suggestions?
 
Last edited:
Can you see any logic in this requests ?
I mean: The query use this dates in order to calculate something ?

In order to debug, save a copy from your form then delete one by one each bound control.
I suspect that not the query ask you for parameters. But one or more controls from the form, when the form is loading/open, is/are trying to requery. And this control(s) ask for parameters.
I refer to controls which can have a query (SQL) as rowsource, especially comboboxes.
 
Check the queries that drive any combos and listboxes that you have on your form.

Also, make a copy of your form, and start deleting controls, one by one, from your copy. When it opens without a problem, then the last control you deleted was the problem, then go fix that in your production form.
 
Also check the LinkMasterFields and LinkChildFields properties of subform controls.
 
:)))))))))) Two brains, 3 minutes, one answer.
No doubt. THIS is the answer to your issue.
 
Aaaand.... I'm an idiot. The problem wasn't the query or the form. The problem was in the query of a subform that I had just copied/pasted into the main from from another one. I had to make a new version of the query with proper parameters and link that instead. Now it works.

Thank you for your help, everyone.
 
Not sure... but if you say... :)
Good luck !
 

Users who are viewing this thread

Back
Top Bottom