List Box

N

NDClark

I have created an Automobile detail form. At the bottom of the form I have a
list box with Maintenance Records displayed.

All maintenance records are on the same table. I do have them connected to
the vehicle through the ID.

How do I display only the maintenance records for that particular vehicle in
my List Box at the bottom of the form?
 
D

Damon Heron

list boxes are generally used to make selections to use in a procedure.
Better for you to use a subform in datasheet view, with the main form bound
to vehicle record with vehicle ID. Then the subform would have a
master/child link of vehicle ID. So only the records for that particular
vehicle show in the subform.
Finding the place to enter the master/child link between a form and subform
is a bit tricky, so post back if you need help.

Damon
 
N

NDClark

Ok, I have the subform in datasheet view inserted at the bottom of my Vehicle
Form. I am still having the same problem. I see all the records from my
'Maintenance Records Table' for all the vehicles on the one vehicle form.

I am looking to open the Vehicle Form and just display the Maintenance
Records for that one vehicle.

I have the Vehicle table 'ID' set as the Primary Key. It is linked to the
Maintenance Record table 'ID'. This is a one to many relationship.

I do not understand what I am missing here. Help!!!
 
C

CompGeek78

Ok, I have the subform in datasheet view inserted at the bottom of my Vehicle
Form.  I am still having the same problem. I see all the records from my
'Maintenance Records Table' for all the vehicles on the one vehicle form.

I am looking to open the Vehicle Form and just display the Maintenance
Records for that one vehicle.  

I have the Vehicle table 'ID' set as the Primary Key.  It is linked to the
Maintenance Record table 'ID'. This is a one to many relationship.  

I do not understand what I am missing here.   Help!!!

Did you set the master/child link field in the subform?

When you select the subform in design view, go to the properties and
on the data tab, there are two fields you need to set to connect the
main form to the subform. Something like Master Linked Field and Child
Linked Field. Master Linked Field is the field in the main form and
Child Linked field is the field in the subform. So in your case it
would be the ID field from the two tables.

Keven Denen
 
D

Damon Heron

and the way to find the Link Master Fields/Link child fields on the property
sheet is to first select your main form, open the property sheet, select
your subform from the combobox at the top of the property sheet, and there
it is under the data tab.

Damon

Ok, I have the subform in datasheet view inserted at the bottom of my
Vehicle
Form. I am still having the same problem. I see all the records from my
'Maintenance Records Table' for all the vehicles on the one vehicle form.

I am looking to open the Vehicle Form and just display the Maintenance
Records for that one vehicle.

I have the Vehicle table 'ID' set as the Primary Key. It is linked to the
Maintenance Record table 'ID'. This is a one to many relationship.

I do not understand what I am missing here. Help!!!

Did you set the master/child link field in the subform?

When you select the subform in design view, go to the properties and
on the data tab, there are two fields you need to set to connect the
main form to the subform. Something like Master Linked Field and Child
Linked Field. Master Linked Field is the field in the main form and
Child Linked field is the field in the subform. So in your case it
would be the ID field from the two tables.

Keven Denen
 

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