Results 1 to 3 of 3
  1. #1
    wolfm is offline Advanced Beginner
    Windows 7 32bit Access 2013
    Join Date
    Dec 2013
    Posts
    93

    Search box

    Is there an easy way using VBA to create a search box, that looks for a specific field in a form?
    I would like a button on a form that is linked to a macro to search under the particular field for a user-entered value.


    I found a macro online, but it keeps giving me a data type mismatch. The field I'm searching under is formatted as short text, but the search text box will not allow me to change it to short text. It gives only number options. Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    A textbox used to enter search criteria must be UNBOUND. Review http://allenbrowne.com/ser-62.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by wolfm View Post
    Is there an easy way using VBA to create a search box, that looks for a specific field in a form?
    I would like a button on a form that is linked to a macro to search under the particular field for a user-entered value.
    I found a macro online, but it keeps giving me a data type mismatch. The field I'm searching under is formatted as short text, but the search text box will not allow me to change it to short text. It gives only number options.
    So what are the Macro's Actions and Arguments? It sounds as if the Macro you found online was designed to search for a Numeric Field, and you want to search a Text Field...the syntax would be different for a Text Field.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 09-12-2016, 11:49 AM
  2. Replies: 8
    Last Post: 09-02-2015, 03:00 PM
  3. Replies: 1
    Last Post: 03-26-2015, 11:08 AM
  4. Replies: 3
    Last Post: 01-04-2015, 06:09 PM
  5. Replies: 3
    Last Post: 09-02-2013, 04:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums