Subform Master Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have a problem. I have a form that has a subform. When I want to search
by items in the main form. I have set up queries and forms for searching and
it works. When it comes to searching items in the subform. I can not get it
to work. when i create the form using the wizzard and I pull in the two
queries that the form is based off of. I lists one query as the Master and
one as the Subform. I want to be able to switch them (the Master as the sub,
and the sub as the master).

The problem is that I am not given that option. even when I select them
into the form in different orders. the computer on allows me to use one of
the queries as the master and the other as the sub. It lets me use both, but
then it just has them as one form, eg not a sub form. I need to be able to
display the information in a subform manner.

Please help if you can.

Thanks

Titan
 
You could build a ComboBox on the main form for the search. Use a query as
record source that has the search field and the mainform/subform link
information.
Have the results as criteria for the query used by the main form. Do this
by have a checkbox. The mainform query would have two sets of criteria -
whatever you are using now and on a second criteria row (to be Or'd) the
combobox. Put the checkbox in the FIELD row like --
X: [Forms]![YourForm]![CheckBox]

In the criteria row below the checkbox field put a 0 (zero) in one and -1
(minus one) in the second. The state of the checkbox will control which
criteria is used.
 
Thanks for the help but Im either confused with your answer or Im not sure if
it answers the problem that im having. Can you please explain it in more
detail how to do it and how it will allow me to switch in my form the master
and the sub

thanks in advance

titan


KARL DEWEY said:
You could build a ComboBox on the main form for the search. Use a query as
record source that has the search field and the mainform/subform link
information.
Have the results as criteria for the query used by the main form. Do this
by have a checkbox. The mainform query would have two sets of criteria -
whatever you are using now and on a second criteria row (to be Or'd) the
combobox. Put the checkbox in the FIELD row like --
X: [Forms]![YourForm]![CheckBox]

In the criteria row below the checkbox field put a 0 (zero) in one and -1
(minus one) in the second. The state of the checkbox will control which
criteria is used.


titan said:
Hello,
I have a problem. I have a form that has a subform. When I want to search
by items in the main form. I have set up queries and forms for searching and
it works. When it comes to searching items in the subform. I can not get it
to work. when i create the form using the wizzard and I pull in the two
queries that the form is based off of. I lists one query as the Master and
one as the Subform. I want to be able to switch them (the Master as the sub,
and the sub as the master).

The problem is that I am not given that option. even when I select them
into the form in different orders. the computer on allows me to use one of
the queries as the master and the other as the sub. It lets me use both, but
then it just has them as one form, eg not a sub form. I need to be able to
display the information in a subform manner.

Please help if you can.

Thanks

Titan
 
I miss read your statements - I thought you wanted to search the main for
elements that contained something from the subform.

I do not know anyway but to build two sets of form/subforms. You could put
a command button to close one and open the other.

titan said:
Thanks for the help but Im either confused with your answer or Im not sure if
it answers the problem that im having. Can you please explain it in more
detail how to do it and how it will allow me to switch in my form the master
and the sub

thanks in advance

titan


KARL DEWEY said:
You could build a ComboBox on the main form for the search. Use a query as
record source that has the search field and the mainform/subform link
information.
Have the results as criteria for the query used by the main form. Do this
by have a checkbox. The mainform query would have two sets of criteria -
whatever you are using now and on a second criteria row (to be Or'd) the
combobox. Put the checkbox in the FIELD row like --
X: [Forms]![YourForm]![CheckBox]

In the criteria row below the checkbox field put a 0 (zero) in one and -1
(minus one) in the second. The state of the checkbox will control which
criteria is used.


titan said:
Hello,
I have a problem. I have a form that has a subform. When I want to search
by items in the main form. I have set up queries and forms for searching and
it works. When it comes to searching items in the subform. I can not get it
to work. when i create the form using the wizzard and I pull in the two
queries that the form is based off of. I lists one query as the Master and
one as the Subform. I want to be able to switch them (the Master as the sub,
and the sub as the master).

The problem is that I am not given that option. even when I select them
into the form in different orders. the computer on allows me to use one of
the queries as the master and the other as the sub. It lets me use both, but
then it just has them as one form, eg not a sub form. I need to be able to
display the information in a subform manner.

Please help if you can.

Thanks

Titan
 
Back
Top