In() ?

R

rb608

I'm only a geeky Access "hobbyist", i.e. I write applications more for
the enjoyment than for professional productivity; but I recently came
across a function I'd never found before while I was making some
enhancements to one of my company's applications (yeah, every once in
a while I get a chance to do something useful).

As a search criteria in a query, the original author had used an "In"
function. Now, I'd always used the Like function with appropriate
wild card characters when looking for a particular string within a
field; but this query was able to search on multiple strings, e.g.
In("Larry","Moe","Curly").

Not having known of the existance of this handy tool, I went to the
Help screens, but found nothing. So I went to the MSKB and still
found nothing.

What's up with that function? Does it really exist, or is it just a
handy trick that Microsoft doesn't support?
 
A

aaron.kempf

I believe that it is supported in queries, but not in VB.

That might be why you're having trouble finding documentation about
it.

If I'm doing this in VBA I just use the Select Case statement

Select Case AccessPlatform
Case "MDB", "ACCDB"
Msgbox "Take SQL Server Classes or find a new job"
Case "ADP"
Msgbox "Take Analysis Services Classes in order to take your
enterprise ready platform to the next level"
End Select

-Aaron
 
D

Dirk Goldgar

rb608 said:
I'm only a geeky Access "hobbyist", i.e. I write applications more for
the enjoyment than for professional productivity; but I recently came
across a function I'd never found before while I was making some
enhancements to one of my company's applications (yeah, every once in
a while I get a chance to do something useful).

As a search criteria in a query, the original author had used an "In"
function. Now, I'd always used the Like function with appropriate
wild card characters when looking for a particular string within a
field; but this query was able to search on multiple strings, e.g.
In("Larry","Moe","Curly").

Not having known of the existance of this handy tool, I went to the
Help screens, but found nothing. So I went to the MSKB and still
found nothing.

What's up with that function? Does it really exist, or is it just a
handy trick that Microsoft doesn't support?


It's a SQL operator, and the help system isn't very good about giving SQL
help unless you drill down to the "Microsoft Jet SQL Reference" topic in the
table of contents. There you'll find it mentioned in the subtopic, "SQL
Expressions".

Unfortunately, it is not a VBA function, so you can't use it in your code
modules.
 
A

Al Campagna

rb608,
In 97 "In" yielded results, and "In Operator" did also.
In 2003, "In" did not yield any results, but... "In Operator" did.
In 2007 "In" did not yield any results, but... "In Operator" did.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
A

aaron_kempf

I will tell you.. with SQL Server books online-- it is _MUCH_ easier
to find information than in this crack-baby Access junk.

I don't hate Access. I just hate so called 'Access Database'.

What a friggin oxymoron

-Aaron
 
R

rb608

It's a SQL operator, and the help system isn't very good about giving SQL
help unless you drill down to the "Microsoft Jet SQL Reference" topic in the
table of contents.  There you'll find it mentioned in the subtopic, "SQL
Expressions".


Aha! Thanks. It was easy to find once I knew where it was. <g>

JF
 
Top