Text box change when combo box change

G

Guest

How to make text boxes change after select an item in the combo box?

Combo Box = [Customer Name]

Text Box = [Address] , [Address Extension] , [Postal Code] , [City] ,
[State] ,
[Country] , [Contact Number] , [Fax Number] , [Term]

Anyone know how ?
If it in VBA, please build in complete form because i am new to VBA and
teach me where to paste to.
 
V

Van T. Dinh

Look at the Orders Form and its RecordSource in the sample database
"NorthWind" that comes with your Access software.
 
G

Guest

Thanks for the response but i have already go through the northwind database
but i still cannot understand nor even work when i copy the code directly and
adjust the field
I know how to synchonize combo box to combo box but we cant change all the
text box to combo box and select every combo each time we change the customer
name combo box
This is not very effective

Any Alternative Please?

Thanks From kennykee

Van T. Dinh said:
Look at the Orders Form and its RecordSource in the sample database
"NorthWind" that comes with your Access software.

--
HTH
Van T. Dinh
MVP (Access)


kennykee said:
How to make text boxes change after select an item in the combo box?

Combo Box = [Customer Name]

Text Box = [Address] , [Address Extension] , [Postal Code] , [City] ,
[State] ,
[Country] , [Contact Number] , [Fax Number] , [Term]

Anyone know how ?
If it in VBA, please build in complete form because i am new to VBA and
teach me where to paste to.
 
G

Guest

Try the combo box wizard. In the toolbox, make sure the magic wand is
highlighted. Click it once if it is not. Click the combo box icon in the
toolbox, and add a combo box to the form. A dialog box will appear. Choose
the option for creating a combo box to select a reocord based on the combo
box selection (or something like that).

kennykee said:
Thanks for the response but i have already go through the northwind database
but i still cannot understand nor even work when i copy the code directly and
adjust the field
I know how to synchonize combo box to combo box but we cant change all the
text box to combo box and select every combo each time we change the customer
name combo box
This is not very effective

Any Alternative Please?

Thanks From kennykee

Van T. Dinh said:
Look at the Orders Form and its RecordSource in the sample database
"NorthWind" that comes with your Access software.

--
HTH
Van T. Dinh
MVP (Access)


kennykee said:
How to make text boxes change after select an item in the combo box?

Combo Box = [Customer Name]

Text Box = [Address] , [Address Extension] , [Postal Code] , [City] ,
[State] ,
[Country] , [Contact Number] , [Fax Number] , [Term]

Anyone know how ?
If it in VBA, please build in complete form because i am new to VBA and
teach me where to paste to.
 
G

Guest

Thanks Bruce. The method you teach me almost work but when i select certain
item in the combo box , it divert me to existing record. And when i want to
create new record, all the existing customer data not appear

Anyone know how to solve?

Thanks in advance from
kennykee

BruceM said:
Try the combo box wizard. In the toolbox, make sure the magic wand is
highlighted. Click it once if it is not. Click the combo box icon in the
toolbox, and add a combo box to the form. A dialog box will appear. Choose
the option for creating a combo box to select a reocord based on the combo
box selection (or something like that).

kennykee said:
Thanks for the response but i have already go through the northwind database
but i still cannot understand nor even work when i copy the code directly and
adjust the field
I know how to synchonize combo box to combo box but we cant change all the
text box to combo box and select every combo each time we change the customer
name combo box
This is not very effective

Any Alternative Please?

Thanks From kennykee

Van T. Dinh said:
Look at the Orders Form and its RecordSource in the sample database
"NorthWind" that comes with your Access software.

--
HTH
Van T. Dinh
MVP (Access)


How to make text boxes change after select an item in the combo box?

Combo Box = [Customer Name]

Text Box = [Address] , [Address Extension] , [Postal Code] , [City] ,
[State] ,
[Country] , [Contact Number] , [Fax Number] , [Term]

Anyone know how ?
If it in VBA, please build in complete form because i am new to VBA and
teach me where to paste to.
 
V

Van T. Dinh

You need to look carefully at the Orders Qry which is the RecordSource for
the Orders Form. This Query inlude data from the Customers Table as well as
Orders Table. The Fields Address, City, Region, PostalCode, Country are
included in this Query and they are used as ControlSources on the Form.
This means that if you pick a Customer in the ComboBox CustomerID, all the
above Fields will be picked correctly from the Table Customer (since they
are all linked to the selected CustomerID) and the Controls on the Form will
display the correct data.

This is the easiest way to do what you want. You don't even need VBA code!
 
G

Guest

THANKS TO ALL WHO HELPED ME

BUT TINA HAS SOLVED MY PROBLEM IN OTHER FORM QUESTION

THANK YOU VERY MUCH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top