Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Chapel Hill, North Carolina, USA
    Posts
    138
    Thanks
    0
    Thanked 0 Times in 0 Posts

    'pre-loading' the Search box in the Find Window (2003)

    Is there a way using VBA to open the "find" window (when searching a memo field) with default search text. I would like to select an item from a combo/list or text box and then search for the text in a memo field.

    Thanks.

    Larry

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

    Re: 'pre-loading' the Search box in the Find Window (2003)

    You can use code like this:

    SendKeys "Some Text"
    RunCommand acCmdFind

    Replace the text between the quotes with the default text you want to be in the box.

  3. #3
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: 'pre-loading' the Search box in the Find Windo

    You can use your Combo/List box in the code as well.

    RunCommand acCmdFind
    SendKeys Me.Combo0

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

    Re: 'pre-loading' the Search box in the Find Windo

    I forgot to mention that explicitly, but yes, you can use an expression instead of a literal string.

Posting Permissions

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