Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populate Text Box With A Seletion From A Combo

Status
Not open for further replies.

Lee24

Programmer
Apr 11, 2001
103
GB
I have a customer database with the usual; fields name, address, telephone etc. What I am trying to is let the user select a customers name from a combo box and from that selection the other text boxes (address, telephone etc) are automatically populate with the customers details.

Can anyone give any help!



Thanks In Advance
 
in the underlying query/table for the combo box, display all the fields you want displayed after the combo box selection, i.e. Name, Address, Tel, etc

set COLUMN COUNT accordingly
make the column widths be 0" for ones you don't want showing when the user clicks on the combo drop-down arrow (i suppose this is all but NAME from what you said).

then, in the control source property of the unbound text boxes that you are using to display address, telephone, etc, you can reference the columns of that underlying table/query (start with 0)

=[cboCOMBO].[Column](0) will show the 1st column of your combo box dataset
=[cboCOMBO].[Column](1) will show the 2nd column of your combo box dataset
=[cboCOMBO].[Column](2) will show the 3rd column of your combo box dataset

etc.

substitute your combo box name for 'cboCOMBO'

g

 
Thanks Guys,

It works like a dream, something else I have learned. Must say that this site is superb for finding answers!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top