How to assign a control source to a unbound text box

F

Faraa.Oh

have a form in Access and want to change the control source of a text
box by changing a value in a combo box.

When a selection is made from the combo box, i want to change the
control source of the text box to one of my fields in a table. I
need the control source to the text box to switch between fields
depending on what value is chosen from the combo box.

How do I do this? Please help.
 
R

Rui

you could for example change the "Row Source Type" from the combo box to
"Field List"
Then, still with the combo box, change the "Row Source" to a table that
contains the fields that you want to display and select.

Finally, add and after update event to the combo box and add a line like this:

Me.TextBox.ControlSource = Me.ComboBox.Value

(You should change the Textbox and ComboBox with the name of each control
that you are using).

Rui
 

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

Similar Threads


Top