Results 1 to 4 of 4
  1. #1
    FriQenstein is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    98

    Query not using Search Criteria

    Greetings all,

    When I create a form to search for inventory in my DB, everything seems to work fine. I use the following for the search criteria on the Search Form:
    Code:
    Like "*" & [Forms]![G-Gun_SearchF]![Description] & "*"
    However, when I COPY a Query, paste it, rename it then change all of the data fields to correspond to the correct table... it just doesn't work at all. I always have to re-create the query from scratch which is a big pain in the ass especially when it comes to time and formatting.

    At any rate, I've recently stumbled onto a problem where some of my Queries aren't functioning properly. For instance, on my Search Form, when the user types in a value to search for and clicks the Search button, it simply throws up a small popup window asking for another search value. I'm not understanding why this is happening to some of the search forms/queries and not others.
    I'm fairly certain I've edited all of the relative data fields, linked tables, etc.

    Here is a snapshot of the 'extra' window that keeps poping up:
    Click image for larger version. 

Name:	Access_Search_Error.png 
Views:	13 
Size:	3.6 KB 
ID:	37043

    Ideas? I have a search form that works perfectly. However, when I try to duplicate it, edit it accordingly to the next set of data/table/query/etc, it never seems to function properly.

    Thanks.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    then something is misspelled.
    use the BUILDER to get the correct spelling of the form object.
    Builder ALWAYS gets it right.

    (if its spelled correctly, then it is not open)

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    As ranman said check your spellings, I can see that the two references in your post are different (the G- in red is missing from your parameter prompt): [Forms]![G-Gun_SearchF]![Description].

    Cheers,
    Vlad

  4. #4
    FriQenstein is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    98
    Turns out that is exactly what was wrong. Apparently I had a typo in one of my tables and obviously the Query was looking something that didn't exist.
    Fixed.
    Thanks.

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

Similar Threads

  1. Replies: 13
    Last Post: 08-16-2017, 01:36 PM
  2. Multi Search Criteria Form/Query
    By NickWren in forum Access
    Replies: 4
    Last Post: 10-04-2016, 05:42 PM
  3. Help on query criteria for a search
    By urbanhawk in forum Queries
    Replies: 3
    Last Post: 01-31-2014, 04:42 PM
  4. Replies: 2
    Last Post: 07-12-2011, 07:53 PM
  5. Replies: 9
    Last Post: 05-05-2011, 02:05 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