R
Robin Tancer
I have a simple query in which I am selecting records from a table based on
information entered on a form.
This is the SQL for it :
SELECT DISTINCTROW Facultative.[Policy#], Facultative.[Certificate#],
Facultative.[Eff Date], Facultative.[Exp Date], Facultative.[Rein Code],
[Estate Table].[Estate Name], Facultative.[Interest%], Facultative.[Use
Flag], Facultative.[Estate Code]
FROM Facultative INNER JOIN [Estate Table] ON Facultative.[Estate Code] =
[Estate Table].[Estate Code]
WHERE (((Facultative.[Policy#]) Like [Forms]![Claim Info]![PCAPOLNBR] ) AND
(([Estate Table].[Estate Name]) Like [Forms]![Claim Info]![Estate Name]) AND
(([Forms]![Claim Info]![Field51]) Between [Facultative]![Eff Date] And
[Facultative]![Exp Date]) AND (([Forms]![Claim Info]![Financial Info]![Paid
Loss])>=[Facultative]![AttachmentPoint]));
My problem is that I would like to add a wildcard (*) before and after the
policy# . However no matter how I try and add it I keep getting errors. I
know how to use the * when I have an exact value - but not when I am
referencing a field on a form.
Any help is greatly appreciated
Thanks
Robin
information entered on a form.
This is the SQL for it :
SELECT DISTINCTROW Facultative.[Policy#], Facultative.[Certificate#],
Facultative.[Eff Date], Facultative.[Exp Date], Facultative.[Rein Code],
[Estate Table].[Estate Name], Facultative.[Interest%], Facultative.[Use
Flag], Facultative.[Estate Code]
FROM Facultative INNER JOIN [Estate Table] ON Facultative.[Estate Code] =
[Estate Table].[Estate Code]
WHERE (((Facultative.[Policy#]) Like [Forms]![Claim Info]![PCAPOLNBR] ) AND
(([Estate Table].[Estate Name]) Like [Forms]![Claim Info]![Estate Name]) AND
(([Forms]![Claim Info]![Field51]) Between [Facultative]![Eff Date] And
[Facultative]![Exp Date]) AND (([Forms]![Claim Info]![Financial Info]![Paid
Loss])>=[Facultative]![AttachmentPoint]));
My problem is that I would like to add a wildcard (*) before and after the
policy# . However no matter how I try and add it I keep getting errors. I
know how to use the * when I have an exact value - but not when I am
referencing a field on a form.
Any help is greatly appreciated
Thanks
Robin