Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2002
    Location
    Bay Area
    Posts
    511

    Unanswered: Show Text in a Text Box As Selected

    I have an Access form that takes user input from one text box. When I prefill the text box with a default value, can I have the text selected so that the user can press the Backspace key to easily remove the default text?

    Thanks.
    Jerry

  2. #2
    Join Date
    Feb 2007
    Posts
    4
    myTextBox.SetFocus
    myTextBox.Text = "My Default Text"
    myTextBox.SelStart = 0
    myTextBox.SelLength = Len(myTextBox.Text)

    You need to set focus to the textbox to access the Text, SelStart and SelLength properties.

  3. #3
    Join Date
    Jan 2002
    Location
    Bay Area
    Posts
    511
    That works! Thank you GeoNet.

Posting Permissions

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