Re: Using field name for IN text string in query criteria



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.

.



Relevant Pages

  • Re: conecting with a MsAcces DB by dao
    ... def append_from_Access: ... def Update(self, query, function): ... , for example, no problem, Access can retrieve a not empty recordset ... Access can retrieves a not empty recordset but my python code ...
    (comp.lang.python)
  • Re: List Box Troubles
    ... syntax error in query exppression ... For example, the * is a wildcard in Jet SQL, ... As to the compiler issue. ... of the Query menu. ...
    (microsoft.public.access.formscoding)
  • Re: gcc compiler options for K&R C code Options
    ... My query is does gcc compiler support K&R C code? ... Much K&R code is still valid C90 or C99 code. ...
    (comp.lang.c)
  • Re: error 80040e10 ......
    ... The error you describe looks like the compiler is expecting a Select Case ... structure, and not a query ... > The error points to the first Reports after the word SELECT ...
    (microsoft.public.access.queries)
  • Re: Parameters in INSERT query problem
    ... > parameters in the query... ... an implicit conversion is going on to make ... why are you creating a recordset from the Execute method of the Command ... You'll only get an empty recordset, ...
    (microsoft.public.data.ado)