Hi,
I have a form with 4 combo boxes. They are used for selecting
SchoolName (lists 28 names), LocationName (lists 4 geographic
locations), EquipmentName (lists 14 equipment types) and
ObservationNumber (lists count number 1-3). All of the the combo boxes
contain two columns. The first column is visible and displays the
common name that the user can identify. The second column is the bound
column and is hidden. This column (2) lists the identification code
associated with each variable in the respective combo box.
I also have a single text box name ExposureID. The exposure ID is
supposed to be comprised of the 4 identification codes associated with
SchoolName, LocationName, EquipmentName and ObservationNumber.
i.e. (SchoolName ID)-(LocationName ID)-(EquipmentName
ID)-(ObservationNumber ID)
This will ideally form a 6 digit ExposureID code that I can use to
reference each specific case.
Is there a way to reference the users previous four selections from the
comboboxes and concatenate them to form this ExposureID variable? Any
advice would be greatly appreciated. Thanks
Chris Meaney
pietlinden@hotmail.com - 06 Jun 2006 06:09 GMT
controlsource for the textbox would be something like:
=Me.cbo1.columns(1) & Me.cbo2.columns(1) & me.cbo3.columns(1)...
the columns collection in a combobox is zero-based (so subtract one
from the ordinal position...)
Then you just need to populate the textbox in the Change event of the
last combobox.