Search Form Help - Option Group

elliot315

Mr. Question
Local time
Today, 13:34
Joined
Jun 3, 2007
Messages
98
Ok I have this search form (see attachment) I want the subform to requery and show the record that meet the criteria, the problem is I had never used the option group feature before and I have no Idea how to write the code to link the option selected to the text criteria and send it to the query to requery the form.
the names used for the form are
for the Option Group : 1 to 6 (the name of the option is a number ie Número de Registro, the first option in the group, is 1.
Frame 17 <--- Don't know if this is required in the code
The query name is "qry Buscar"
The subform name is "sbfrm Buscar"
The Text field is "Criteria"

The texts in the option group are the same for the fields in the query

Thank You In Advanced... This Forum Really Rocks.. Got Answers even before posting my question!
 

Attachments

  • Searchfrm.jpg
    Searchfrm.jpg
    77 KB · Views: 170
The option group name is used as the criteria in a query, not the individual group numbers.
 
Please someone who can help me with this situation...:confused:
 
In the query you reference the FRAME not the option buttons, so if option 1 is selected, the Frame's value would be 1 (if you set up the options to be numbered 1-6).

You would set the query's criteria for the field in question (and that's what the options have to translate to) to be [Forms]![YourFormName].[FrameName].
 
So, that means I must have a query for each option of the frame and one form for each one too?.. if the answer is YES, is there a way to only have one query and send the parameter to the query so it requeries with that parameter?
 
Done! Took Some time but it works like Charm... 6 subforms, 6 queries... and playing around with the visible argument.
 

Users who are viewing this thread

Back
Top Bottom