I have a combobox that has different record types. I would like to have code run based off of selection to change data in one of the controls on the same form. So say someone selects OMPF in the carton # control it adds a 1 in front of the number or if someone selects FOIA in the carton # control it adds a 0 in front of the number. Here is the code I was trying to work with.
Thanks in advance!Code:Private Sub BOX_NUMBER_AFTERUPDATE() If Me.RECORD_TYPE = OMPF Then Me.CARTON__ = "1" + Right([BOX NUMBER], 3) Else Me.CARTON__ = "1" + Right([BOX NUMBER], 3) End If Me.TEAM_NUMBER = Left([BOX NUMBER], 1) End Sub