hi Bill,
try this for citeria:
Like "*" & [Forms]![f_ReportsMain]![txtGroupNumber] & "*"�
~crystal
VBA code you can use in your projects
http://msaccessgurus.com/code.htm
I am on Window 10, Access 365
� I am trying to write a query that finds a customer based on a policy number.�� Initially his worked fine and the results were returned in a form with the policy number and the customer number.
� The difficulty I am having is when I only know part of the policy number.
� The query pulls the policy number from a text box on a form and searches a table for the customer. The results are displayed in a pop up form.
If I type the policy number into the Criteria box of the query such as� �31090��� the query runs fine.
If I type the policy number into the Criteria box of the query such as�� Like �*31090*��� the query runs fine.� This catches complete and partial policy numbers.
If I reference the text box on the form such as��� [Forms]![f_ReportsMain]![txtGroupNumber]��� the query runs fine, but it only catches complete policy numbers.
� However, when I put in������ Like "*[Forms]![f_ReportsMain]![txtGroupNumber]*"���� to try to search for complete or partial matches the query returns� zero results.
� What am I doing wrong to be able to search for partial or complete policy numbers.
� Thank you.
� Bill Singer
Minnesota
Posted by: crystal 8 <strive4peace2008@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
Tidak ada komentar:
Posting Komentar