View Full Version : Combo Box with five Text Box


Neo90815
07-26-2000, 07:47 AM
Hi,

I got an example of what I needed to do, but can't seem to figure out how they did it.

What this Combox Box does is that once user has made a selection...it would automaticly up date the Text Boxes below it. For example; Joe Smith lives in Long Beach California...Once select Joe Smith in the Combo Box..Long Beach will appear on Text Box, and California appear on another Text Box automaticly...

How they do that? Thanks!
can also email me fwdit2me@aol.com

Robert Dunstan
07-26-2000, 10:27 AM
Hi Neo90815

Judging by your query have you taken over the administration of someone else's database?

I have a combo box that does the same thing. I developed a purchase ordering database and have a form called frmNewOrder. The underlying record source for the form is a query that retrieves data form the relevant tables. The combo box displays a list of all available suppliers and when the user selects one the other text boxes displays the address etc.

How achieved this was not too difficult. In my .mdb I have a the following tables tblSuppliers, tblOrdersMain and tblOrdersDetails. There is a field in tblOrdersMain called SupplierID which is a lookup field and links to SupplierID in tblSuppliers i.e its basically a combo box at table level. I then created a query that included SupplierID from tblOrdersMain and the various address fields from tblSuppliers.

I then created the form based on this query and all the controls inherited the field properties so I had a combo box that allowed the user to select a supplier and text boxes that were automatically populated with the supplier's adrress.

It sounds a long winded process but its all part of the design process. There are probably other ways but this one worked for me.

Let me know how you get on

Neo90815
07-26-2000, 01:31 PM
Thanks!

I have Office 2000; and there are samples of databases that come with it. I saw what I was looking for but can't seem to copy it. I tried your suggestion and I can't seem to make it work for me.

I have a table name "Call Manager" and another table called "Users". The User table has the following fields; User Name, Dept., Extension, etc.

The "Call Manager" table has a lookup field name "User Name ID" ;the Control Source is "SELECT [User].[ID], [User].[User Name] FROM [User];" (Sample database has "SELECT DISTINCTROW")

I created my Query based on Call Manager Table "User Name ID" field, and all the fields in Users Table; My form did not work. The combo box is there on the form, but after making a selection none of the text boxes up date. The form is based on the Query.

Office 2000 has a patch SR-1; which I already downloaded and installed; this got to be me. I just have to continue trying.

Can you show me step by step? Thanks!




[This message has been edited by Neo90815 (edited 07-26-2000).]

Neo90815
07-31-2000, 12:56 PM
Robert,

Thanks for the tip. After serveral trys, I did it. Just as you described it. For some reasons it did not work on the old data base. I created a new data base and it worked. So it was not me...it's this Access Program that is not working consistently...

Thanks!

Neo90815
07-31-2000, 12:58 PM
Robert,

Hi, Thanks it finally works!... I created a new data base and did what you had described and it works. For some reasons it did not work in the old data base....

Thanks a million..you're a life saver!

Sincerely,