Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    387
    Thanks
    0
    Thanked 1 Time in 1 Post

    Update text box value on change (XP)

    I have a list box that uses a WHERE to filter on a text box's value. I'd like to update the listbox every time a character is entered in the text box but the WHERE does not see the value in the text box until the update occurs, ie when the focus moves from the text box.

    How can I update the value of the text box on the Change event so the list box shows changes?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Update text box value on change (XP)

    You have to use TextBoxName.Text in the On Change event of TextBoxName.

    When the On Changed event occurs, the value of the text box is the "stored" value, i.e. the old, unedited value. The current text as being edited by the user is the Text property of the text box.
    The Text property is *only* available when the text box has the focus, you get an error if you refer to it while another control has the focus.

  3. #3
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Brisbane, Queensland, Australia
    Posts
    387
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Update text box value on change (XP)

    Fab - I just changed the criteria of the list box data to -

    Like "*" & [Forms]![frmFind]![txtItem_Code].[text] & "*"

    and it works a treat

    Many thanks Hans

Posting Permissions

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