Have a second text box auto fill when combo box is filled

J

Joe

This has to easy not requiring any programing.
I have two columns in a table. One column is "customer name" the other is
"customer code". I have a form where I currently use 2 combo boxes where I
either select from a list or type each in. I would like to enter the
"customer Name" and have the "Customer Code" complete its self when I enter
over it or not even have to enter over it. Since they are both already in the
same table it sounds like it should not require much to accomplish.
Please keep this simple since I am a novice.
 
A

Arvin Meyer [MVP]

You don't need to display both, except in the customer form itself. On that
form, you need 2 text boxes. All other forms should display the customer
name, but store the customer code. To do that, create a combo box with both
columns, setting column 1's width to zero (0"), and column 2's width to
whatever width will display it best. If you absolutely must display them
both, read the customer code from the combo box by setting an unbound text
box's controlsource to:

NameofCombo.Column(0)
 
J

Joe

I will print the form so it must be visible to the operator. I think I
understand. I will have to give this a try. The combo box will have two
columns Column 1 will be the name and column 2 will be the code. Column 2
will have zero characters so it is not seen. I will use a text box for the
code which will reference the combo box column 2.
 

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