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 / Modules / DAO / VBA / April 2007

Tip: Looking for answers? Try searching our database.

VBA - MS Access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
junior - 30 Apr 2007 19:26 GMT
I have a combobox (cboCompany) and when a user selects a value from
cboCompany I want it to display in a textbox (txtSearch).  I am not sure
about how to this in VBA/Access.
Ofer Cohen - 30 Apr 2007 19:38 GMT
One option, write in the ControlSource of the txtSearch text box

=[cboCompany].column(1)

Or, second option, use the AfterUpdate event of the Combo and write the code
Me.txtSearch = Me.cboCompany.column(1)

Note: The column number start with 0, so the number depend on the column
number in the RowSource of the combo

Signature

Good Luck
BS"D

> I have a combobox (cboCompany) and when a user selects a value from
> cboCompany I want it to display in a textbox (txtSearch).  I am not sure
> about how to this in VBA/Access.
junior - 30 Apr 2007 19:50 GMT
Thanks, worked like a charm.  Man its been years since I have worked with
VBA, thanks

> One option, write in the ControlSource of the txtSearch text box
>
[quoted text clipped - 9 lines]
> > cboCompany I want it to display in a textbox (txtSearch).  I am not sure
> > about how to this in VBA/Access.
 
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.