Ask a Question related to Microsoft Access, Design and Development.

  1. #1

    Default Search Functions

    Hi,

    I have a Contacts database and currently use the 'binocular' search
    function built into Access. However, it does not suit all of my needs
    and there are some aspects of it I would like to change. Is there a
    way to edit the existing search function in a more comprehensive way
    than changing it between Fast, General and Start of Field? Is it
    possible to create a search function that behaves in the same way
    (finding and displaying the record in the complete list; I don't want
    to filter it)?

    Thanks,
    Matt
    Matthew DeAngelis Guest

  2. Similar Questions and Discussions

    1. ANN: InterAKT Site Search - search in multiple tables
      Hello, We have just released a new product, MX Site Search, meant to help web developers and designers create a search form in their dynamic...
    2. Need Catalog and Search Functions
      I recently moved from a PB G3 running System 9.x to a PB G4 running 10.3.4. I am using Acrobat 5.0.5 and it appears that the Catalog and Search...
    3. #25786 [NEW]: PHP website uses cookies to remember last search phrase in search box
      From: tipsen at imada dot sdu dot dk Operating system: - PHP version: Irrelevant PHP Bug Type: Unknown/Other Function Bug...
    4. #10743 [Com]: class functions & PHP core functions inconsistently clash ;)
      ID: 10743 Comment by: destes at ix dot netcom dot com Reported By: jjones at net-conex dot com Status: Open...
    5. XP Search - how to not search inside .ZIP files
      Is there any way to make the Windows Explorer Search facility not search the contents of .ZIP files?
  3. #2

    Default Re: Search Functions

    Sure, in place of stuff the results into a "pick list", simply open the form
    using the where clause


    I used the "like" command to match the first few characters. I would give
    that try.

    So, make a simple form with a text box. In the after update even, simply
    open the main edit form.

    Try:

    dim strWhere as string

    strWhere "LastName like '" & me.txtSearch & "*'"

    docmd.OpenForm "mainCusotmer",,,strWhere

    The above will thus open direct to the form.

    If the search is for a id field, or a number field (ie: not a "text" field),
    then you don't need the quotes.

    I would try the above. If you want only allow exact matches, then use:

    dim strWhere as string

    strWhere "LastName = '" & me.txtSearch & "'"

    docmd.OpenForm "mainCusotmer",,,strWhere

    --
    Albert D. Kallal (MVP)
    Edmonton, Alberta Canada
    [email]kallal@msn.com[/email]
    [url]http://www.attcanada.net/~kallal.msn[/url]


    Albert D. Kallal Guest

  4. #3

    Default Re: Search Functions

    Albert D. Kallal wrote:
    > Sure, in place of stuff the results into a "pick list", simply open
    > the form using the where clause
    >
    >
    > I used the "like" command to match the first few characters. I would
    > give that try.
    >
    > So, make a simple form with a text box. In the after update even,
    > simply open the main edit form.
    >
    > Try:
    >
    > dim strWhere as string
    >
    > strWhere "LastName like '" & me.txtSearch & "*'"
    >
    > docmd.OpenForm "mainCusotmer",,,strWhere
    >
    > The above will thus open direct to the form.
    >
    > If the search is for a id field, or a number field (ie: not a "text"
    > field), then you don't need the quotes.
    >
    > I would try the above. If you want only allow exact matches, then use:
    >
    > dim strWhere as string
    >
    > strWhere "LastName = '" & me.txtSearch & "'"
    >
    > docmd.OpenForm "mainCusotmer",,,strWhere
    >
    > --
    > Albert D. Kallal (MVP)
    > Edmonton, Alberta Canada
    > [email]kallal@msn.com[/email]
    > [url]http://www.attcanada.net/~kallal.msn[/url]

    Albert,

    This works essentially the way I would like it, except that the
    Contacts form (the primary edit form) still opens in a filtered view (I
    only get the entries that match the field, instead of jumping to the
    correct entry within the full display). Is this the case any time a
    link criteria is set? How does the code behind the Access search
    function focus on a part of the form without filtering it?


    Thanks,
    Matt
    Matthew DeAngelis Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139