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 / Forms / December 2007

Tip: Looking for answers? Try searching our database.

How-To: Select and Display Combo Box choice with VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Stu - 05 Dec 2007 19:48 GMT
How To:  Using a value from another field I would like to display a certain
selection in a combo box.  For example if a user selects 'X' then I would
like to display ITEM(3). What combo box properties/methods should I be using?
Kinlye - 05 Dec 2007 20:01 GMT
Use after update event on the item where the user selects "X".

> How To:  Using a value from another field I would like to display a certain
> selection in a combo box.  For example if a user selects 'X' then I would
> like to display ITEM(3). What combo box properties/methods should I be using?
Stu - 05 Dec 2007 20:09 GMT
My question wasn't about the event but what is the VBA code to select and
display a combo box choice.

> Use after update event on the item where the user selects "X".
>
> > How To:  Using a value from another field I would like to display a certain
> > selection in a combo box.  For example if a user selects 'X' then I would
> > like to display ITEM(3). What combo box properties/methods should I be using?
Douglas J. Steele - 05 Dec 2007 20:21 GMT
Define "a certain selection in a combo box".

Does your ITEM(3) mean that you want the value of the third row of the combo
box?

Which column of the combo box does you want?

Assuming you want the value of the first value of the third row, you'd use
something like:

Me.NameOfComboBox.Column(0, 2)

(numbering starts at 0)

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> How To:  Using a value from another field I would like to display a
> certain
> selection in a combo box.  For example if a user selects 'X' then I would
> like to display ITEM(3). What combo box properties/methods should I be
> using?
Stu - 05 Dec 2007 20:57 GMT
Thanks that got me on the right track.  Here is what I was looking for:
Me.NameOfComboBox=Me.NameOfComboBox.Column(0, 2)
Case Closed.

> Define "a certain selection in a combo box".
>
[quoted text clipped - 15 lines]
> > like to display ITEM(3). What combo box properties/methods should I be
> > using?
 
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.