retract three names from one criteria

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

Guest

i am new to using access what i want to do is using query i want to get 3
names out of the first name field i.e. i would like to pull out harry,eric
and debbie.. i know they are there but i do not know exactly how to type it
in??. cam someone help me with this?? please
 
WHERE FirstName IN ("Harry", "Eric", "Debbie")

To create the query in the GUI, type IN ("Harry", "Eric", "Debbie") in the
Criteria cell under the Firstname cell.
 
The criteria in the query would be

Field: [FirstName]
Criteria: IN ("Harry","Eric","Debbie")
 
..tried this and it says syntax error (comma) in query expression (((table
staff.first name=("harry","eric","debbie")????

John Spencer (MVP) said:
The criteria in the query would be

Field: [FirstName]
Criteria: IN ("Harry","Eric","Debbie")

i am new to using access what i want to do is using query i want to get 3
names out of the first name field i.e. i would like to pull out harry,eric
and debbie.. i know they are there but i do not know exactly how to type it
in??. cam someone help me with this?? please
 
Does your machine have the Regional Settings such that you use semicolons as
separators? If so, try

IN ("Harry";"Eric";"Debbie")


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



scary said:
.tried this and it says syntax error (comma) in query expression (((table
staff.first name=("harry","eric","debbie")????

John Spencer (MVP) said:
The criteria in the query would be

Field: [FirstName]
Criteria: IN ("Harry","Eric","Debbie")

i am new to using access what i want to do is using query i want to get 3
names out of the first name field i.e. i would like to pull out harry,eric
and debbie.. i know they are there but i do not know exactly how to type it
in??. cam someone help me with this?? please
 
now it says you ommited an operand or operator, you entered an invalid
character or comma, or you entered trext without surrounding it in quotation
marks now im really confused

Douglas J. Steele said:
Does your machine have the Regional Settings such that you use semicolons as
separators? If so, try

IN ("Harry";"Eric";"Debbie")


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



scary said:
.tried this and it says syntax error (comma) in query expression (((table
staff.first name=("harry","eric","debbie")????

John Spencer (MVP) said:
The criteria in the query would be

Field: [FirstName]
Criteria: IN ("Harry","Eric","Debbie")


scary wrote:

i am new to using access what i want to do is using query i want to get 3
names out of the first name field i.e. i would like to pull out harry,eric
and debbie.. i know they are there but i do not know exactly how to type it
in??. cam someone help me with this?? please
 
scary said:
.tried this and it says syntax error (comma) in query expression (((table
staff.first name=("harry","eric","debbie")????


You did something different than what Doug and John thought
you were going to do.

1. You used = instead of IN

2. Names that include spaces or other funky characters must
be enclosed in [ ]. Try this
[table staff].[first name] IN("harry","eric","debbie")
 
OK, can you copy and post the SQL of your query? Even though it is giving you an error.

(Possibly unneeded instructions follow)
Open the query
Select View:Sql from the Menu
Select all the text
Copy it
Paste it into the message

This might give us a hint in where we are mis-advising you or where the problem
in communication lies.
now it says you ommited an operand or operator, you entered an invalid
character or comma, or you entered trext without surrounding it in quotation
marks now im really confused

Douglas J. Steele said:
Does your machine have the Regional Settings such that you use semicolons as
separators? If so, try

IN ("Harry";"Eric";"Debbie")


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



scary said:
.tried this and it says syntax error (comma) in query expression (((table
staff.first name=("harry","eric","debbie")????

:

The criteria in the query would be

Field: [FirstName]
Criteria: IN ("Harry","Eric","Debbie")


scary wrote:

i am new to using access what i want to do is using query i want to get 3
names out of the first name field i.e. i would like to pull out harry,eric
and debbie.. i know they are there but i do not know exactly how to type it
in??. cam someone help me with this?? please
 
Good eye, Marsh.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Marshall Barton said:
scary said:
.tried this and it says syntax error (comma) in query expression (((table
staff.first name=("harry","eric","debbie")????


You did something different than what Doug and John thought
you were going to do.

1. You used = instead of IN

2. Names that include spaces or other funky characters must
be enclosed in [ ]. Try this
[table staff].[first name] IN("harry","eric","debbie")
 
i did it no really you did it thanks a million peole

Douglas J. Steele said:
Good eye, Marsh.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



Marshall Barton said:
scary said:
.tried this and it says syntax error (comma) in query expression (((table
staff.first name=("harry","eric","debbie")????


You did something different than what Doug and John thought
you were going to do.

1. You used = instead of IN

2. Names that include spaces or other funky characters must
be enclosed in [ ]. Try this
[table staff].[first name] IN("harry","eric","debbie")
 
Back
Top