subform question

M

mitchmcc

I am pretty new to Access (2003), and am trying to understand how
to do something that I am pretty sure should be straightforward, but
I have not yet gotten it.

I have a query that makes selections from several tables, based on
one table's primary key, let's call it widgetId. Let's call the query
"associated stuff about widgets" (asaw). So obviously I have a
widgets table.

I have tested the query and it is working okay.

Now, what I want is a form with a subform, where the top part of
the form is just all of the widgets. As you select one of them,
I want the bottom part (the subform) to show ONLY those query
entries from the asaw query that match the widget id in the top
part of the form.

When I try to do this, the items in the subform never change.

What do I have to do to get the two parts (the form and the subform)
to move in sync with each other?

Thanks,

Mitch
 
D

Dirk Goldgar

I am pretty new to Access (2003), and am trying to understand how
to do something that I am pretty sure should be straightforward, but
I have not yet gotten it.

I have a query that makes selections from several tables, based on
one table's primary key, let's call it widgetId. Let's call the query
"associated stuff about widgets" (asaw). So obviously I have a
widgets table.

I have tested the query and it is working okay.

Now, what I want is a form with a subform, where the top part of
the form is just all of the widgets. As you select one of them,
I want the bottom part (the subform) to show ONLY those query
entries from the asaw query that match the widget id in the top
part of the form.

When I try to do this, the items in the subform never change.

What do I have to do to get the two parts (the form and the subform)
to move in sync with each other?

Thanks,

Mitch


Presumably the RecordSource of the main form is the Widgets table, or a very
simple query of it, while the RecordSource of the subform is the"asaw"
query. Probably what is missing is that you must set the Link Master Fields
and LInk Child Fields of the subform control (the control on the main form
that shows the subform) to WidgetID. That tells Access how the records on
the subform are related to the record on the main form.
 
M

mitchmcc

Presumably the RecordSource of the main form is the Widgets table, or a very
simple query of it, while the RecordSource of the subform is the"asaw"
query.  Probably what is missing is that you must set the Link Master Fields
and LInk Child Fields of the subform control (the control on the main form
that shows the subform) to WidgetID.  That tells Access how the recordson
the subform are related to the record on the main form.

Dirk,

That makes sense. I will look at this and see if I can get it to
work.

Thanks,

Mitch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top