By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,488 Members | 2,552 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,488 IT Pros & Developers. It's quick & easy.

Populating a text box based on results from a combo box

P: n/a
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

Jun 5 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.

Jun 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.