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 linking to Table fields

    Greetings all,



    I have Queries galore... and they all work except one of them. The last one that I made just doesn't seem to want to work correctly no matter if I build it from scratch or copy, paste & edit it from an existing working Query.

    Here is the scenario:
    The Query is built using the proper table. In this instance table name = Bolt-Gun_Parts.
    So my Form that uses a search function, like all of my other ones, calls the Bolt-Parts_SearchQ (Query).
    My search criteria in the Query is as follows:
    Code:
    Like "*" & [Forms]![Bolt-Parts_SearchF]![Description] & "*"
    Bolt-Parts_SearchF is the form used to do the search.

    However, when I'm typing in the criteria in the Query for the search features, it doesn't want to pull information from the table accordingly. For instance, when you start typing the line above Like "*" & [Forms]![Bolt-Parts_SearchF]![Description]....
    When you get to the [Forms] portion of the line, Access will pop up it's friendly little widow with the list of options to choose, as per normal.
    Same thing when you get to the portion with [Bolt-Parts... the pop up list appears. However when I get to the [Description] portion, nothing happens. No popup and the Query is basically broken at this point.

    I'm obviously missing something simple somewhere, but everything appears to be setup accordingly, even when I do a side-by-side comparison with my others that all work just fine.

    Any assistance would be greatly appreciated.
    Thanks.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Are you saying there are no items listed for Bolt-Parts_SearchF?

    An issue may be caused by fact Description is a reserved word http://allenbrowne.com/AppIssueBadWord.html#D. Should avoid using reserved words as names for anything.

    Also should not use punctuation/special characters (underscore only exception) in naming convention.

    Don't depend on the Expression Builder (I don't), just type out the expression you want and see what happens.
    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
    FriQenstein is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    98
    I think I fixed it. It appears to be functioning now, however I had to actually set the Control Source in the properties window for each field whereas in all of my other search queries the control source was null and it pulled everything from the search form, passed it to the query then output it to the Report.

    It's definitely strange that this one particular query is acting different from all the others.

    As for the naming convention, I understand what you mean. I had some issues earlier on so I resulted in using dashes and underscores which appear to be OK when working with everything.

    Thanks.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Dash is a special character (minus sign) and therefore can cause issues if don't use [ ] to enclose object names. Again, better to not use.
    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.

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

Similar Threads

  1. Linking fields through alias table
    By Ekhart in forum Forms
    Replies: 2
    Last Post: 02-06-2018, 07:19 PM
  2. Linking multiple fields in a table
    By mjf8563 in forum Access
    Replies: 2
    Last Post: 10-16-2016, 09:44 AM
  3. Linking fields between a query and table
    By Access_Novice in forum Access
    Replies: 3
    Last Post: 09-13-2014, 11:52 PM
  4. Replies: 0
    Last Post: 03-04-2011, 10:28 AM
  5. Fields not Linking to Table
    By jlclark4 in forum Forms
    Replies: 2
    Last Post: 12-20-2010, 08:04 AM

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