View Full Version : display corresponding textbox value issue

02-02-2007, 09:07 AM
Hi community experts,

May I knw whether is it possible to display the corresponding value of the second textbox based on the user input in the first textbox? This means that once the user enters the value of first textbox - S1, the corresponding matching value based on first textbox will be displayed in the second textbox automatically.

I have tried using the AfterUpdate() event of textbox1 control to trigger this scenario but doesnt seem to be working. Perhaps that is not the correct event for this scenario.

Alternatively, I have also thinking of using two contols for this scenario, textbox and combo box respectively. Textbox will accept user input and combo box will populate or filter the result (corresponding value) based on the first textbox. Hence, nt too sure as to how that can be achieved. Hence, any advice, direction or code snippets are very much appreciated!


Student table
StudentId S1 S2 S3
Name Peter Shaun Alfred

Student table view
StudentId - datatype(text), primary key
Name - datatype(text)

Form design

Student profile

StudentId - unbounded textbox1
Name - unbounded textbox2


StudentId - unbounded textbox1
Name - unbounded combo box1

02-02-2007, 09:58 AM
Hello technocraze,
Try useing textbox change event...
couple of quick questions....is this on a userform and which app(excel, word)....I just noticed primary key...is it access?

Bob Phillips
02-02-2007, 12:30 PM
AfterUpdate should work, as should Exit. Can you post your code?

02-04-2007, 05:40 PM
Cross-posted here (http://www.vbaexpress.com/forum/showthread.php?t=11306)

Bob Phillips
02-05-2007, 05:03 AM