Query By Form opening Parameter boxes on form open

Autoeng

Why me?
Local time
Today, 10:57
Joined
Aug 13, 2002
Messages
1,302
I've created a query by form such as Jon's example here http://www.access-programmers.co.uk/forums/showthread.php?t=103312&highlight=query+form but whenever I open the form I get parameter boxes asking for data AND one past that after I input the data on the form and run the query I get the parameter boxes again.

In Jon's example is there some property setting that keeps the query from running on form open and after getting past that why am I getting parameter boxes from the form Search button?

Thanks
 

Attachments

I've created a query by form such as Jon's example here http://www.access-programmers.co.uk/forums/showthread.php?t=103312&highlight=query+form but whenever I open the form I get parameter boxes asking for data AND one past that after I input the data on the form and run the query I get the parameter boxes again.

In Jon's example is there some property setting that keeps the query from running on form open and after getting past that why am I getting parameter boxes from the form Search button?

Thanks


i see this in your criteria of your query:
Code:
Like "4-way"
it is NOT a proper control reference when asking a query to look at a form for parameter purposes. jon has provided the appropriate referencing method in his post:

The example basically sets the criteria for each field in a separate column in the query grid like this in query Design view:-
-------------------------------------
Field: [FieldName]=[Forms]![FormName]![ControlName] or [Forms]![FormName]![ControlName] Is Null
[/quote]

try putting in the correct reference first. just like access, i have no idea what "4-way" you are referring to - a form? a control? a global variable? you HAVE to be specific when asking access to do anything.
 
The form I am using is "Hose Cut Query Form". It is two subforms, "Hose Data Display 3way" and "Hose Data Display 4way". I can have a hose in the table twice with the only difference being "Tension 1" or "Tension 2" fields with the field "Function" being the deciding primary key with entry of either "3-way" or "4-way". Note - My sample db does not reflect this difference. When running the query it looks at the appropriate Function so that it decides which record to return into which subform.
 

Users who are viewing this thread

Back
Top Bottom