Problem with filtering a combo box with another combo box which filters another

jjake

Registered User.
Local time
Yesterday, 23:26
Joined
Oct 8, 2015
Messages
291
Ok so I have 3 combo boxes

cboPlant
cboEquipmentType
cboEquipmentName

All 3 come from different tables and have their own unique PK

I'm using the following following query

25ourn5.jpg


This is my form. When I filter the last combo box it will not record the data into my table and whenever I move to the next record the value will not be displayed until I refresh the record.

2rcvrxh.jpg


This is the table

velulj.jpg


Any idea what my problem is? :confused:
 
jjake,

Here are 2 free tutorials from Datapig that deal with cascading combos.
http://www.datapigtechnologies.com/flashfiles/combobox1.html
http://www.datapigtechnologies.com/flashfiles/combobox2.html

These are using Access 2003, but the coding and concepts are applicable to all versions.

I also think your relationships may be a problem. You would relate tables based on PK and FK and normally when you make an autonumber PK in a table, you would name it along these lines.
TblEquipmenttype
EquipmentTypeID autonumber

EquipmenttypeDescription text
...
....
Then in TblEquipment
EquipmentID Autonumber
EquipmentName
EquipmentDescription
EquipmentTypeID_FK Long <---use the value of the related EquipmentTypeID as FK
...
...

I would expect that in TblEquipment there could be many pieces that are the same equipment type. So 1 Type of equipment could relate to Many pieces of Equipment. Which would mean that TblEquipmentType relates to TblEquipment in a 1 to Many relationship.

You may want to review Primary Key, Foreign Key and relationships.

Good luck with your project.
 
Last edited:
manually edit all problematic records. when done, include UnitId in the subform's Link Master Fields/ Link Child Fields when editing your form.
 

Users who are viewing this thread

Back
Top Bottom