Troubleshooting Document Search Form Data Retrieval Issues

Walter Laidlaw 20 Reputation points
2025-08-22T18:53:59.1566667+00:00

There is a query-based search form that sources data from a query linked to the primary table. Although the search form operates correctly, some items from the documents table are not appearing in the form when it is opened, and there does not seem to be a pattern to the missing items.

Assistance is needed to troubleshoot this issue.

Walt

Microsoft 365 and Office | Access | For home | Windows
0 comments No comments
{count} votes

Answer accepted by question author
  1. Duane Hookom 26,525 Reputation points Volunteer Moderator
    2025-08-23T18:38:57.0366667+00:00

    You are using Like in your criteria with no wildcards. Are users expected to type "*" into search boxes?

    For instance:

    (([FName 1]) Like "" & Forms!DocSearchF!FName1Search & "" Or ([FName 1]) Is Null) And

    should be:

    (([FName 1]) Like & Forms!DocSearchF!FName1Search & "*" Or ([FName 1]) Is Null) And

    Also, you aren't accommodating when users leave a control like FName1Search blank.

    0 comments No comments

8 additional answers

Sort by: Most helpful
  1. Duane Hookom 26,525 Reputation points Volunteer Moderator
    2025-08-22T21:54:55.7033333+00:00

    Does your documents table have a related record in the other table(s) used in the query? Do you see all the document records when you view the query?

    0 comments No comments

  2. Walter Laidlaw 20 Reputation points
    2025-08-22T22:33:37.0433333+00:00

    That's a problem - I can open the query in design view, but when I try to open it in Form View I get an error message "Enter Parameter Value" "Forms!DocSearchF!FamilySearch". The formula in the query for Famil Search is : Like "" & [Forms]![DocSearchF]!FamilySearch]& "" Or is Null. This is the same formula for all the search queries except the on to search a range of dates. That one is: Between [Forms]![DocSearchF]![YearMinSearch] And [Forms]![DocSearchF]![YearMaxSearch].

    Sorry I should have mention this before as this probably needs to be cleared up before it will work. How can I fix this?

    Second part - I'm not quite sure how to answer this. None of the records are use in another table or query. It's basically the Documents Table, the Documents Search Query and the Documents Search Form.

    0 comments No comments

  3. Duane Hookom 26,525 Reputation points Volunteer Moderator
    2025-08-22T23:06:32.28+00:00

    Can you provide the SQL view of the query(s)?

    Have you confirmed the form and control names?

    0 comments No comments

  4. Walter Laidlaw 20 Reputation points
    2025-08-23T17:34:52.7533333+00:00

    Yes, I have confirmed that the form and control names are correct.

    Attached is the SQL View of the DocSearchQ.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.