Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    May 2002
    Location
    Melbourne, Australia
    Posts
    269
    Thanks
    32
    Thanked 0 Times in 0 Posts

    Find dialog box (Access 97)

    Is there a way of setting the value of Match to be "Any Part of Field" instead of the default "Whole Field" when the Find dialog box is displayed using an Event Procedure?

    I am using: DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

    Thank you. <img src=/S/aussie.gif border=0 alt=aussie width=21 height=22>

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

    Re: Find dialog box (Access 97)

    Have a look at <!post=Post 32585, 32585>Post 32585<!/post> and <!post=Post 135633, 135633>Post 135633<!/post>.

  3. #3
    3 Star Lounger
    Join Date
    May 2002
    Location
    Melbourne, Australia
    Posts
    269
    Thanks
    32
    Thanked 0 Times in 0 Posts

    Re: Find dialog box (Access 97)

    Thanks for the advice Hans ... I actually looked at these postings before posting my own question because as an ignorant beginner I did not understand how to apply those suggestions to my situation.

    My Find button is working fine, except it displays the dialog box with the Access default Match condition of "Whole field" instead of "Any part of a field".

    So, I was hoping that someone may know the appropriate switch for this that I could add to the command I am using:

    DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70

    If there is no such switch (I couldn't find it), then perhaps suggesting the actual line of code to use instead of the above, to display the Find dialog box with the Match set to "Any part of a field".

    Thank you. <img src=/S/aussie.gif border=0 alt=aussie width=21 height=22>

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

    Re: Find dialog box (Access 97)

    In the first place, you should replace the antiquated DoMenuItem by RunCommand (see below). According to Microsoft, you can use SendKeys to set the matching option. But many experts will warn you that using SenKeys is flaky, so use it at your own risk. And it is language-dependent, since the accelerator keys in dialog boxes are different for each language.

    You can use the following for the English language version of Access 97:

    SendKeys "%ha%n"
    RunCommand acCmdFind

    See KB article 120912

  5. #5
    3 Star Lounger
    Join Date
    May 2002
    Location
    Melbourne, Australia
    Posts
    269
    Thanks
    32
    Thanked 0 Times in 0 Posts

    Re: Find dialog box (Access 97)

    Thank you very much for taking the time to help me Hans ... I replaced the antiquated Access 2.0 code I was using with the one you suggested and it works perfectly ... thanks also for the Knowledge Base article explaining it all.

    You're great! <img src=/S/aussie.gif border=0 alt=aussie width=21 height=22>

Posting Permissions

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