My Assistant
![]() ![]() |
|
|
Sep 5 2006, 09:29 AM
Post
#1
|
|
|
UtterAccess VIP Posts: 4,621 From: North Carolina, USA |
I'm attempting to set a row source of a list box. The only field which has any critera has a text datatype, for which I would like to use a variable with a wildcard (*).
So far, if I only use the variable as the criteria, the statement performs as intended. If I try to include the asterisk, I get nothing. and darned if I can figure out the syntax. CODE "SELECT tblMessage.MsgPK, tblMessage.Date_Stamp, tblMessage.Msg " & _ "FROM tblMessage " & _ "Where (((tblMessage.Msg) =[color="red"] '" & strSitePrefix & "'[/color]))" & _ "ORDER BY tblMessage.Date_Stamp DESC;" strSitePrefix is a 3 character text string (example ABC), and I would like the criteria to ultimately be "*ABC*" Thanks, Matt |
|
|
|
Sep 5 2006, 09:36 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 9,209 From: Maryland |
Try:
CODE Where (((tblMessage.Msg) = '*" & strSitePrefix & "*'))" & _ HTH. |
|
|
|
Sep 5 2006, 09:47 AM
Post
#3
|
|
|
UtterAccess VIP Posts: 4,621 From: North Carolina, USA |
So simple... (IMG:http://www.utteraccess.com/forum/style_emoticons/default/crazy.gif)
Thanks William |
|
|
|
Sep 5 2006, 11:21 AM
Post
#4
|
|
|
UtterAccess VIP Posts: 9,209 From: Maryland |
Glad I could help. Good luck with your project.
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 18th May 2013 - 09:53 PM |