Results 1 to 12 of 12
  1. #1
    New Lounger
    Join Date
    Feb 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Get rid of Highlighted Data in field (2000)

    When I open a form with only One Text field, the text in that field is always highlighted until I hit my mouse button. Is there a way of de-highlighting this field without using the mouse so when I open the form, the text data field isn't highlighted....I am using this form for an informational message only. .. there will be no updating. Thanks!

  2. #2
    New Lounger
    Join Date
    Nov 2001
    Location
    Twickenham, UK
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Highlighted Data in field (2000)

    The only option I can think of would be to change the settings in Tools/Options/Keyboard from 'Select Entire Field' to 'Got to Start of Field' in the Behaviour Entering Field section.

    If there's something else you could do to change it without changing these settings, I'm sure someone else will pipe up...

  3. #3
    New Lounger
    Join Date
    Nov 2001
    Location
    Twickenham, UK
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Highlighted Data in field (2000)

    Thinking about it...is there any other control on the form (eg. a Close Form Button), because you could give it the focus on form open (or make it the first item in the Tab order) and thus avoid changing any settings.

  4. #4
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Get rid of Highlighted Data in field (2000)

    If text will not be updated then change the text box Tab Stop property to No and text will not be highlighted when you open form.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Get rid of Highlighted Data in field (2000)

    If you're using it only to display information, you could probably use a label control instead of a textbox, unless of course it's a *bound* textbox. Otherwise, the label will take care of your problem, since labels can't receive the focus anyhow.
    Charlotte

  6. #6
    Star Lounger
    Join Date
    Dec 2001
    Location
    Fredensborg, Denmark
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Highlighted Data in field (2000)

    Since you are not updating set the Enabled property of the textbox to No. If you do not want the text to appear dimmed set the Locked property of the textbox to Yes (in addition).

    Yo may want to take a look at help for the Enabled property to get full explanation.

  7. #7
    New Lounger
    Join Date
    Feb 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Highlighted Data in field (2000)

    thanks for the help everyone...but I also forgot to mention that this text field also has the ability to Grow...(It's defined as Memo field)....and the screen cannot. Therefore, I can't use a Label field for this. and I tried the Locked/Enabled/Tab Stop to "No" suggestions but they don't work...any other suggestions? Thanks!

  8. #8
    New Lounger
    Join Date
    Feb 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Highlighted Data in field (2000)

    Thanks...It does work...but I need it to work for just this specific form...do you know how to change the "Options" using VBA code? I could change the options when I open this form and change it back when I close it...but I don't know how to actually change the options via code...any suggestions? thanks!

  9. #9
    Star Lounger
    Join Date
    Dec 2001
    Location
    Fredensborg, Denmark
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Highlighted Data in field (2000)

    The Enabled/Locked way of doing it works fine for me.
    If it's a smalldbs post your it (or mail it me if you like).

  10. #10
    New Lounger
    Join Date
    Feb 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Highlighted Data in field (2000)

    here's a test mdb...open form "message display" and you'll see the highlighted text. thanks...
    Attached Files Attached Files

  11. #11
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Get rid of Highlighted Data in field (2000)

    I checked out the attachment, if you changed the Enabled/Locked properties from Yes/No to No/Yes the highlighting went away... but if you want to change the Keyboard "Behavior Entering Field" options when opening/closing form use the applicable Application SetOption method on the form's On Open or On Close event:
    <pre> Application.SetOption "Behavior Entering Field", 0 'Select entire field
    Application.SetOption "Behavior Entering Field", 1 'Go to start of field
    Application.SetOption "Behavior Entering Field", 2 'Go to end of field
    </pre>

    HTH

  12. #12
    Star Lounger
    Join Date
    Dec 2001
    Location
    Fredensborg, Denmark
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get rid of Highlighted Data in field (2000)

    I have looked at your dbs and must admit I do not understand what your aim is. Why do you use a Dlookup? Do you you want to have a table of error messages? Or is this just a single error message that you want to display?
    If you have a table of error messages you will have to identify each msg with a unique ID in order to distinguish between different errors.
    In any of these cases you could simply use the MsgBox function to display your message or in the case of multiple error messages in the table you could open the form (using the table as a recordsource) filtered on the unique ID.

Posting Permissions

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