Consulting

Results 1 to 5 of 5

Thread: display corresponding textbox value issue

  1. #1

    display corresponding textbox value issue

    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!

    Scenario

    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

    or

    StudentId - unbounded textbox1
    Name - unbounded combo box1

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    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?
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    AfterUpdate should work, as should Exit. Can you post your code?

  4. #4
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Cross-posted here

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •