Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / June 2006

Tip: Looking for answers? Try searching our database.

Populating a text box based on results from a combo box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Meaney - 05 Jun 2006 16:29 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.