Bingo…!!!
That did it.
Thank you.
Bill Singer
From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com>
Sent: Thursday, December 27, 2018 3:01 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Find a customer
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
On 12/27/2018 2:24 PM, Bill.Singer@at-group.net [MS_Access_Professionals] wrote:
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: <Bill.Singer@at-group.net>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (3) |
Tidak ada komentar:
Posting Komentar