Re: Using field name for IN text string in query criteria
- From: "JB" <jenniferbanzon@xxxxxxxxx>
- Date: 29 Jul 2006 10:07:42 -0700
Thanks for you rresponse and efforts to help. This seems like such a
simple issue but it is turning out to be tricky. Should I just change
the query to pull the NetworkID's instead? At least I am not messing
with strings that way. I would like to solve this for future reference
but maybe I am spending too much time on it and can just try a
different approach.
To get this
"abc", "def", "ghi","jkl"
use
Me.txtNetworks = ""abc", "def", "ghi","jkl""
I tried this before and the compiler does not accept it. When it gets
to abc, it highlights it and says "expected end of statement."
Or - easier to read - take advantage of the fact that the standard SQL
literal string delimiter is actually the apostrophe:
Me.txtNetworks = "'abc', 'def', 'ghi', 'jkl'"
I have tried this before also. The compiler accepts it but no records
get selected by the query. It returns an empty recordset.
.
- Follow-Ups:
- Prev by Date: Re: Add values to a text field
- Next by Date: Re: Using field name for IN text string in query criteria
- Previous by thread: Re: Add values to a text field
- Next by thread: Re: Using field name for IN text string in query criteria
- Index(es):
Relevant Pages
|