Combo Box and Bound Text Box

MayoRR5

Registered User.
Local time
Today, 16:57
Joined
Aug 27, 2009
Messages
31
Hi all,

I have a text box on a form which I want to be controlled by what is selected in a combo box on the same form without the use of queries and subforms.

For example:-

Table 1
tblSchedule contains a unique ID(SchID) and a value(SchValue) for that ID. The combo box will show what ID's are available and I want the text box to populate with the value(SchValue) after a selection is made.

Table 2
tblMaterial contains a unique ID(MatID), description(MatDesc) and a value(MatValue). The combo box will show both the ID and the description and I want the text box to populate with the value(MatValue) after a selection is made.


Any and all help is much appreciated and please note I am not a VB expert but I can make sense of most codes. :D

Thanks alot in advance for the help.

MayoRR5
 
Create you combo so that it's Control source selects all the information you want.

Now in the Control source of your Text Box put;
Code:
=ComboName.Column([B]X[/B])
Were X is the column number of the column in the combo that contains the information you wish displayed in the text box. Remember that the columns in the Combo are numbered from 0 (Zero) up i.e.. 0,1,2 etc.
 
You are a legend John BB.

That has been annoying me for about 2 and a half weekd now :o

Thanks for the help!!!!!

MayoRR5
 

Users who are viewing this thread

Back
Top Bottom