Update second combo box when first combo box is selcted

L

Lawrence

Hi,
New user here and hopefully an easy answer. I have 2 fields on a page,
field one is violationcode and field 2 is violation. Both fields pull from a
table. I would like for violtaion to be auto populated with the proper info
when something is chosen from violationcode and vice versa. Could someone
please tell me how this happens?
 
L

Larry Linson

Lawrence said:
Hi,
New user here and hopefully an easy answer. I have 2 fields on a page,
field one is violationcode and field 2 is violation. Both fields pull
from a
table. I would like for violtaion to be auto populated with the proper
info
when something is chosen from violationcode and vice versa. Could someone
please tell me how this happens?

If both violationcode and violation are in the same table, include them both
in the Row Source of the Combo Boxes, sizing each so that only the one of
interest is visible. In the AfterUpdate event of each Combo Box, set the
value of the other ComboBox using the .Column property of the Combo Box.

Larry Linson
Microsoft Access MVP
 
E

Ed Warren

Sounds like if given a ViolationCode I then know the Violation (1:1).

If this is true you only need to store the ViolationID and can convert that
into a violation as needed (reports, forms, etc.)

Ed Warren.
 
Top