471,580 Members | 1,614 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,580 software developers and data experts.

Populating a text box based on results from a combo box


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
1 1907
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.

Similar topics

1 post views Thread by Jason | last post: by
3 posts views Thread by Neil Guyette | last post: by
3 posts views Thread by Frustrated Developer via DotNetMonster.com | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.