Like operator conflicts in query

J

John

I am unable to figure out how to fit the wild card character in my
query that is looking at a Pop up box for input. What I do know is
that normally one would use the Like criterion looking as,(Like "C*")
for example.

I have a Pop up box where the user inputs criterion upon which a query
for a report is based. The Pop up box is called
[Forms]![FilterNB]![txtPickGroupNB]

Here is the SQL statement...

SELECT NBTrans.actID, NBTrans.SecSymbol, NBTrans.SymbolDescription,
NBTrans.Slam_No1, NBTrans.Slam_No2, NBTrans.TranCode,
NBTrans.TranDate, etc. etc
FROM NBTrans
WHERE (((NBTrans.Slam_No1) Like [Forms]![FilterNB]![txtPickGroupNB]));

The Slam_No1 field is a numberic sequence with three different groups
of data. One group starts with a T one with a U and one with a C.
T-101, T-102, T-103 and so on for example.

Thanks for any help
John
 
J

John

It worked!
Thanks
John

Ernie said:
Try:

WHERE (((NBTrans.Slam_No1) Like ([Forms]![FilterNB]!
[txtPickGroupNB] & "*")));

-----Original Message-----
I am unable to figure out how to fit the wild card character in my
query that is looking at a Pop up box for input. What I do know is
that normally one would use the Like criterion looking as, (Like "C*")
for example.

I have a Pop up box where the user inputs criterion upon which a query
for a report is based. The Pop up box is called
[Forms]![FilterNB]![txtPickGroupNB]

Here is the SQL statement...

SELECT NBTrans.actID, NBTrans.SecSymbol, NBTrans.SymbolDescription,
NBTrans.Slam_No1, NBTrans.Slam_No2, NBTrans.TranCode,
NBTrans.TranDate, etc. etc
FROM NBTrans
WHERE (((NBTrans.Slam_No1) Like [Forms]![FilterNB]! [txtPickGroupNB]));

The Slam_No1 field is a numberic sequence with three different groups
of data. One group starts with a T one with a U and one with a C.
T-101, T-102, T-103 and so on for example.

Thanks for any help
John
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top