Wow! That makes sense...Thank you for that, it is encouraging. There
is not a lot of blog out there about this.
Let's do it your way. I have read similar explanations with less
clarity. Here is what I have:
cboPlant
Row Source: tblPlant
Column Count:2
Column Widths: 0";1"
After Update: Requery cboProcess
Bound Column:1
cboProcess
Row Source: qry--
SELECT [tblPlant/Process].[Process ID], [tblPlant/Process].Process
FROM [tblPlant/Process]
WHERE ((([tblPlant/Process].[Plant ID])=[Forms]![frmPlantProcess]!
[Plant]))
ORDER BY [tblPlant/Process].[Plant ID] DESC;
Column Count:2
Coulumn Widths:0";1"
After Update: Requery cboEquipment
Bound Column:1
cboEquipment
Row Source: qry--
SELECT [tblProcess/Equipment].[Equipment ID], [tblProcess/
Equipment].Equipment
FROM [tblProcess/Equipment]
WHERE ((([tblProcess/Equipment].[Process ID])=[Forms]!
[frmPlantProcess]![Process]))
ORDER BY [tblProcess/Equipment].[Process ID];
Column Count:2
Coulumn Widths:0";1"
After Update: Requery cboErrorcode
Bound Column:1
cboErrorcode
Row Source:qry--
SELECT [tblEquip/Error].[Error ID], [tblEquip/Error].[Error Code]
FROM [tblEquip/Error]
WHERE ((([tblEquip/Error].[Equipment ID])=[Forms]![frmPlantProcess]!
[cboEquipment]))
ORDER BY [tblEquip/Error].[Equipment ID] DESC;
Column Count:2
Coulumn Widths:0";1"
Bound Column:1
You forgot to post the form's record source query. Lacking
that, I'll just use placeholder names for the names I don't
know.
The first thing you need to do is modify the form's record
source query so it looks something like:
SELECT T.*,
tblPlant.plantnamefield,
PP.Process,
E.Equipment,
ERR.[Error Code]
FROM (((sometable As T
LEFT JOIN tblPlant
ON T.plantFKfield = tblPlant.plantPKfield)
LEFT JOIN [tblPlant/Process] As PP
ON T.ProcessFKfield = PP.[Process ID])
LEFT JOIN [tblProcess/Equipment] As E
ON T.equipmentFKfield = E.[Equipment ID])
LEFT JOIN [tblEquip/Error] As ERR
ON T.equipmenterrorFKfield = ERR.[Error ID]
Run the query by itself to make sure it runs, returns all
the correct values and that all but the last four fields are
updatable.
Assuming all that goes well, then bind the plantname text
box to the plantnamefield, process text box to the Process
field, equipment text box to the Equipment field and the
error code text box to [Error Code]
Set the TabStop property to No for all these text boxes.
Then create a GotFocus event procedure for each text box to
reset the focus to the correspondingcombobox. For
example, the plant text box's GotFocus event procedure would
be:
Me.cboPlant.SetFocus
Finally, size and position each text box over the top of the
text portion of its corresponding text box. (Use the Format
- Bring to Front menu item if needed.)
--
Marsh
MVP [MS Access]- Hide quoted text -
- Show quoted text -