Bring back exact id'sand not using InStr()

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Expr1: InStr([Type Member Numbers separated by
commas,Blank=All],[MemberNumber]) to allow the user to bring back a list of
Members based upon ID. I got this either from MS Site directly or off of the
discusssion group.

But since it uses InStr i get other members as well. Is there any syntax to
allow the users to enter any number of IDs and get only those Members?

tia.
 
InStr will return the starting position of one string within another.

Example:
InStr("String1", "ing") will return 4

I believe what you are after is an IN statement in the criteria.

In (1, 44, 76, 88)
or
In ("Abe", "Mary", "John")
 
Thanks for the reply. I actually posted this in the wrong forum. It meant to
go to Access Queries. And, the actual answer is this:

InStr("," & [Type Member Numbers separated by commas,Blank=All] & ",",","
&
[MemberNumber] & ",")


Wayne Morgan said:
InStr will return the starting position of one string within another.

Example:
InStr("String1", "ing") will return 4

I believe what you are after is an IN statement in the criteria.

In (1, 44, 76, 88)
or
In ("Abe", "Mary", "John")

--
Wayne Morgan
MS Access MVP


HB said:
I am using Expr1: InStr([Type Member Numbers separated by
commas,Blank=All],[MemberNumber]) to allow the user to bring back a list
of
Members based upon ID. I got this either from MS Site directly or off of
the
discusssion group.

But since it uses InStr i get other members as well. Is there any syntax
to
allow the users to enter any number of IDs and get only those Members?

tia.
 
Back
Top