Well here is a head start...
tblManufacture
ManuShortName - primary key, string
ManuName - full name of manufacture, string
tblModel
ModelID - autonumber
ManuShortName - foreign key to tblManufacture
ModelYear - text, string, 4
ModelName - text
Use the Relationship tool to establish a relationship between the Manufacture and Model tables. From the menu, "Tools" -> "Relationships". Add above tables. Select the field ManuShortName in the tblModel and drag it to the same field in tblManufacture. You will be prompted for referential integrity. Alway enforce referenctial integrity.
Now create a form for the tblModel. From the database window, select "Forms" and then use the wizard to create a form. Edit the design. Right click on the control field for ManuShortName. From the list of options, select "Change to", and then select "Combo box".
Make sure the properties window is open. (From the menu, select "View" -> "Properties"). Make sure the ManuShortName combo box is selected.
In the properties window, select the data tab. Then select the Row Source field. From the drop down list, select the manufacturing table, tblManufacture, and click on the "..." command button that appears to the right. This opens up the Query builder. Double click on the ManuShortName field to add the field to the query. You may wish to add "Ascedning" for the sort option. Close the query builder and save.
Repeat the above for the Model field. This time, instead of a combo box, choose ListBox, when the query builder pops up, add the field Model.
Reselect the ManuShortName combo box. In the properties window, select "Events". You probably don't want to sue the more commonly used event for this process, AfterUpdate event. Instead, for the walk-through, let's use the DoubleClick event. Select the DoubleClick event, and start typing [Event Procedure] - the system will automatically fill this out for you. Now select the "..." elipse command button that appears to the right. This will open up the VBA programming window.
So what we want to do is when a user double clicks on the Manufacturer combo box, only models for the selected manufacturer will appear the Model list box.
Add the following code...
Code:
Dim strQ as String, strManu as String, strSQL as String
strQ = Chr$(34)
strSQL = "SELECT Model From Model Where ManuShortName = "
strManu = Nz(Me.Manufacture, "")
If Len(strManu) Then
Me.Model.RowSource = strSQL & strQ & strManu & strQ
Me.Model.Requery
End If
Assuming you have data in the Manufacturing and Model tables, what should happen after you select a Manufactuer in the combo box and double click the combo box, the list box for models will display the models for the manufacturer.
As you can see, the code is pretty simple. Most of the above was setting things up so "we" were on the same page.
Richard