textbox value changes,when value of the combobox changes

stylo4321

Registered User.
Local time
Today, 14:54
Joined
Jul 9, 2008
Messages
12
In my table1 there is a columm productID and a columm productname which are related

In my form I have a combobox where you can select the productname.

I would like to have a textbox showing the productID of the productname depending of the choice in the combobox.
For example when I choose productname a from the combobox there should appear 1 in the textbox

How should I handle this?
 
How are you populating the combobox ? Because if you have populate it using a lookup table, the productid is already in that combobox ... all you have to do go to the properties of the combobox, look for the width property (you should find two values in that property) and edit the first value from 0 to something like 2cm.
 
Look at "DemoProductIDA2000.mdb"
 

Attachments

How are you populating the combobox ? Because if you have populate it using a lookup table, the productid is already in that combobox ... all you have to do go to the properties of the combobox, look for the width property (you should find two values in that property) and edit the first value from 0 to something like 2cm.

I use another table as source of my combobox where i refer to like the way you describe. But that's not quite my problem; I posted an like witch my clearify
 
Look at Text4(ProductID) field, CONTROL SOURCE properties.
First column in combo box i column 0.
 
Thx for all the reply's; last question how do you make it grey and not able to put your cursor in?
 
ENABLED properties (for this field) put NO.
 

Users who are viewing this thread

Back
Top Bottom