Query a Subform

  • Thread starter Thread starter Oden1988
  • Start date Start date
O

Oden1988

I have created a database using several tables which I incorporated into one
main form that uses subforms to populate all the tables. My question is how
do I create a query that will query the subform (by supplying input from the
user...I know how to do this part) and return the requested information into
the form. Basically, I input data into the main form, and when I want to
query (to find a specific set of data) I want that record to show in the
form. Without going into much detail as to the contents of the tables, I
have a main table with names and the other tables contain, email info, phone
info, and address info. Each table can contain multiple entries linked to
each name, so I need to be able to query on each table to pull that set of
linked records into the form for addition, deletion and/or changes to that
record; ie a new phone number for a person.

Thanks for any help you can provide.
 
I did this, but when I try to create query to find data in the subform
tables, the query does not return any data. I am not sure how to write the
query to pull data from the subform.
 
The query for the subforms is simply a generic query of the table that
contains all of the fields you need AND must contain the foreign key
that links that table to the master table.

Then you need to make sure that the Data Tab of the subform when it is
on the mainform contains information about the master/child field
names.

In fact, usually when you go to place the subform on the main form it
will ask about that relatioinship IF the main form is bound to a table
or query. If it is not then you have to manually enter the master/
child field names yourself.

Ron
 
Back
Top