Access Query

C

Chris

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
C

Chris

When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

KARL DEWEY said:
Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


Chris said:
I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
K

KARL DEWEY

Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


Chris said:
When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

KARL DEWEY said:
Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


Chris said:
I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
C

Chris

yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

KARL DEWEY said:
Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


Chris said:
When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

KARL DEWEY said:
Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
K

KARL DEWEY

I expect that you are storing a number instead of a name.

Post your query SQL as Klatuu suggested.

--
Build a little, test a little.


Chris said:
yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

KARL DEWEY said:
Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


Chris said:
When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

:

Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
C

Chris

sorry but without sounding too new to the program how do I post my SQL of the
query?

KARL DEWEY said:
I expect that you are storing a number instead of a name.

Post your query SQL as Klatuu suggested.

--
Build a little, test a little.


Chris said:
yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

KARL DEWEY said:
Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


:

When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

:

Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
K

KARL DEWEY

Open the query in design view, click on VIEW - SQL View, highlight all, copy,
and paste in a post.
--
Build a little, test a little.


Chris said:
sorry but without sounding too new to the program how do I post my SQL of the
query?

KARL DEWEY said:
I expect that you are storing a number instead of a name.

Post your query SQL as Klatuu suggested.

--
Build a little, test a little.


Chris said:
yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

:

Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


:

When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

:

Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
C

Chris

SELECT Group.UserName, Group.DirectoryName
FROM [Group]
WHERE (((Group.UserName)=[Enter Name]));


KARL DEWEY said:
Open the query in design view, click on VIEW - SQL View, highlight all, copy,
and paste in a post.
--
Build a little, test a little.


Chris said:
sorry but without sounding too new to the program how do I post my SQL of the
query?

KARL DEWEY said:
I expect that you are storing a number instead of a name.

Post your query SQL as Klatuu suggested.

--
Build a little, test a little.


:

yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

:

Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


:

When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

:

Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
K

KARL DEWEY

They are all lookup fields.I think you need your other table joined on the common field -
something like this --
SELECT [OtherTable].[UserName], Group.DirectoryName
FROM [OtherTable] LEFT JOIN [Group] ON [OtherTable].[CommonField] =
[Group].[CommonField]
WHERE [OtherTable].[UserName]=[Enter Name]

If this is still puzzling to you then post all the table and field names
with datatype and sample data.

--
Build a little, test a little.


Chris said:
SELECT Group.UserName, Group.DirectoryName
FROM [Group]
WHERE (((Group.UserName)=[Enter Name]));


KARL DEWEY said:
Open the query in design view, click on VIEW - SQL View, highlight all, copy,
and paste in a post.
--
Build a little, test a little.


Chris said:
sorry but without sounding too new to the program how do I post my SQL of the
query?

:

I expect that you are storing a number instead of a name.

Post your query SQL as Klatuu suggested.

--
Build a little, test a little.


:

yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

:

Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


:

When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

:

Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
C

Chris

As I read and reread what you have written here I think that I am getting
what you are saying. I can't post the information do to sensitivity but
think that I am understanding. So is this criteria that I should write down
what it should read in the SQL view. and I am assuming that [Other table] is
just refering to a different table and not the table with multiple listings
of the same name.

KARL DEWEY said:
I think you need your other table joined on the common field -
something like this --
SELECT [OtherTable].[UserName], Group.DirectoryName
FROM [OtherTable] LEFT JOIN [Group] ON [OtherTable].[CommonField] =
[Group].[CommonField]
WHERE [OtherTable].[UserName]=[Enter Name]

If this is still puzzling to you then post all the table and field names
with datatype and sample data.

--
Build a little, test a little.


Chris said:
SELECT Group.UserName, Group.DirectoryName
FROM [Group]
WHERE (((Group.UserName)=[Enter Name]));


KARL DEWEY said:
Open the query in design view, click on VIEW - SQL View, highlight all, copy,
and paste in a post.
--
Build a little, test a little.


:

sorry but without sounding too new to the program how do I post my SQL of the
query?

:

I expect that you are storing a number instead of a name.

Post your query SQL as Klatuu suggested.

--
Build a little, test a little.


:

yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

:

Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


:

When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

:

Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
C

Chris

I entered in the syntax that you gave me into the SQL view and It works but I
don't know what its looking for with the common field? It prompts me to type
in something but I don't know what to type. Is that where I would put in the
name?

KARL DEWEY said:
I think you need your other table joined on the common field -
something like this --
SELECT [OtherTable].[UserName], Group.DirectoryName
FROM [OtherTable] LEFT JOIN [Group] ON [OtherTable].[CommonField] =
[Group].[CommonField]
WHERE [OtherTable].[UserName]=[Enter Name]

If this is still puzzling to you then post all the table and field names
with datatype and sample data.

--
Build a little, test a little.


Chris said:
SELECT Group.UserName, Group.DirectoryName
FROM [Group]
WHERE (((Group.UserName)=[Enter Name]));


KARL DEWEY said:
Open the query in design view, click on VIEW - SQL View, highlight all, copy,
and paste in a post.
--
Build a little, test a little.


:

sorry but without sounding too new to the program how do I post my SQL of the
query?

:

I expect that you are storing a number instead of a name.

Post your query SQL as Klatuu suggested.

--
Build a little, test a little.


:

yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

:

Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


:

When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

:

Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
K

KARL DEWEY

I can't post the information do to sensitivity
Is you data so sensitive that you can not post the query SQL?

Earlier you said 'So I have one table with everyones name in it once ...'
That is the 'other table' I was refereing to.
The 'common field' is the field that relates them, usually the primary key
of the table having name only once.

--
Build a little, test a little.


Chris said:
I entered in the syntax that you gave me into the SQL view and It works but I
don't know what its looking for with the common field? It prompts me to type
in something but I don't know what to type. Is that where I would put in the
name?

KARL DEWEY said:
They are all lookup fields.
I have one table with everyones name in it once
I think you need your other table joined on the common field -
something like this --
SELECT [OtherTable].[UserName], Group.DirectoryName
FROM [OtherTable] LEFT JOIN [Group] ON [OtherTable].[CommonField] =
[Group].[CommonField]
WHERE [OtherTable].[UserName]=[Enter Name]

If this is still puzzling to you then post all the table and field names
with datatype and sample data.

--
Build a little, test a little.


Chris said:
SELECT Group.UserName, Group.DirectoryName
FROM [Group]
WHERE (((Group.UserName)=[Enter Name]));


:

Open the query in design view, click on VIEW - SQL View, highlight all, copy,
and paste in a post.
--
Build a little, test a little.


:

sorry but without sounding too new to the program how do I post my SQL of the
query?

:

I expect that you are storing a number instead of a name.

Post your query SQL as Klatuu suggested.

--
Build a little, test a little.


:

yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

:

Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


:

When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

:

Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
C

Chris

I have alreadt posted the Query SQL that i had before. You has asked to post
the tables and field names with data type and samples. That I don't think I
should do. I just copied what you told me to use in the SQL view and changed
the [Other Table] to the other table and included it in the design view so
that it knew where to look and now when i run it, it says that there is a
syntax error in the Join Operation. I again I just used the syntax that you
gave me to use.
That is:
SELECT [OtherTable].[UserName], Group.DirectoryName
FROM [OtherTable] LEFT JOIN [Group] ON [OtherTable].[CommonField] =
[Group].[CommonField]
WHERE [OtherTable].[UserName]=[Enter Name]


KARL DEWEY said:
Is you data so sensitive that you can not post the query SQL?

Earlier you said 'So I have one table with everyones name in it once ...'
That is the 'other table' I was refereing to.
The 'common field' is the field that relates them, usually the primary key
of the table having name only once.

--
Build a little, test a little.


Chris said:
I entered in the syntax that you gave me into the SQL view and It works but I
don't know what its looking for with the common field? It prompts me to type
in something but I don't know what to type. Is that where I would put in the
name?

KARL DEWEY said:
They are all lookup fields.
I have one table with everyones name in it once
I think you need your other table joined on the common field -
something like this --
SELECT [OtherTable].[UserName], Group.DirectoryName
FROM [OtherTable] LEFT JOIN [Group] ON [OtherTable].[CommonField] =
[Group].[CommonField]
WHERE [OtherTable].[UserName]=[Enter Name]

If this is still puzzling to you then post all the table and field names
with datatype and sample data.

--
Build a little, test a little.


:

SELECT Group.UserName, Group.DirectoryName
FROM [Group]
WHERE (((Group.UserName)=[Enter Name]));


:

Open the query in design view, click on VIEW - SQL View, highlight all, copy,
and paste in a post.
--
Build a little, test a little.


:

sorry but without sounding too new to the program how do I post my SQL of the
query?

:

I expect that you are storing a number instead of a name.

Post your query SQL as Klatuu suggested.

--
Build a little, test a little.


:

yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

:

Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


:

When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

:

Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
K

KARL DEWEY

Without specific information I will not be able to help you further.

--
Build a little, test a little.


Chris said:
I have alreadt posted the Query SQL that i had before. You has asked to post
the tables and field names with data type and samples. That I don't think I
should do. I just copied what you told me to use in the SQL view and changed
the [Other Table] to the other table and included it in the design view so
that it knew where to look and now when i run it, it says that there is a
syntax error in the Join Operation. I again I just used the syntax that you
gave me to use.
That is:
SELECT [OtherTable].[UserName], Group.DirectoryName
FROM [OtherTable] LEFT JOIN [Group] ON [OtherTable].[CommonField] =
[Group].[CommonField]
WHERE [OtherTable].[UserName]=[Enter Name]


KARL DEWEY said:
I can't post the information do to sensitivity
Is you data so sensitive that you can not post the query SQL?

Earlier you said 'So I have one table with everyones name in it once ...'
That is the 'other table' I was refereing to.
The 'common field' is the field that relates them, usually the primary key
of the table having name only once.

--
Build a little, test a little.


Chris said:
I entered in the syntax that you gave me into the SQL view and It works but I
don't know what its looking for with the common field? It prompts me to type
in something but I don't know what to type. Is that where I would put in the
name?

:

They are all lookup fields.
I have one table with everyones name in it once
I think you need your other table joined on the common field -
something like this --
SELECT [OtherTable].[UserName], Group.DirectoryName
FROM [OtherTable] LEFT JOIN [Group] ON [OtherTable].[CommonField] =
[Group].[CommonField]
WHERE [OtherTable].[UserName]=[Enter Name]

If this is still puzzling to you then post all the table and field names
with datatype and sample data.

--
Build a little, test a little.


:

SELECT Group.UserName, Group.DirectoryName
FROM [Group]
WHERE (((Group.UserName)=[Enter Name]));


:

Open the query in design view, click on VIEW - SQL View, highlight all, copy,
and paste in a post.
--
Build a little, test a little.


:

sorry but without sounding too new to the program how do I post my SQL of the
query?

:

I expect that you are storing a number instead of a name.

Post your query SQL as Klatuu suggested.

--
Build a little, test a little.


:

yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

:

Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


:

When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

:

Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
C

Chris

I understand. Thank you for your help up to now. I really appreciate it

KARL DEWEY said:
Without specific information I will not be able to help you further.

--
Build a little, test a little.


Chris said:
I have alreadt posted the Query SQL that i had before. You has asked to post
the tables and field names with data type and samples. That I don't think I
should do. I just copied what you told me to use in the SQL view and changed
the [Other Table] to the other table and included it in the design view so
that it knew where to look and now when i run it, it says that there is a
syntax error in the Join Operation. I again I just used the syntax that you
gave me to use.
That is:
SELECT [OtherTable].[UserName], Group.DirectoryName
FROM [OtherTable] LEFT JOIN [Group] ON [OtherTable].[CommonField] =
[Group].[CommonField]
WHERE [OtherTable].[UserName]=[Enter Name]


KARL DEWEY said:
I can't post the information do to sensitivity
Is you data so sensitive that you can not post the query SQL?

Earlier you said 'So I have one table with everyones name in it once ...'
That is the 'other table' I was refereing to.
The 'common field' is the field that relates them, usually the primary key
of the table having name only once.

--
Build a little, test a little.


:

I entered in the syntax that you gave me into the SQL view and It works but I
don't know what its looking for with the common field? It prompts me to type
in something but I don't know what to type. Is that where I would put in the
name?

:

They are all lookup fields.
I have one table with everyones name in it once
I think you need your other table joined on the common field -
something like this --
SELECT [OtherTable].[UserName], Group.DirectoryName
FROM [OtherTable] LEFT JOIN [Group] ON [OtherTable].[CommonField] =
[Group].[CommonField]
WHERE [OtherTable].[UserName]=[Enter Name]

If this is still puzzling to you then post all the table and field names
with datatype and sample data.

--
Build a little, test a little.


:

SELECT Group.UserName, Group.DirectoryName
FROM [Group]
WHERE (((Group.UserName)=[Enter Name]));


:

Open the query in design view, click on VIEW - SQL View, highlight all, copy,
and paste in a post.
--
Build a little, test a little.


:

sorry but without sounding too new to the program how do I post my SQL of the
query?

:

I expect that you are storing a number instead of a name.

Post your query SQL as Klatuu suggested.

--
Build a little, test a little.


:

yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

:

Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


:

When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

:

Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
C

Chris

ok I spent time making a data base that is similiar to the one that I have
questions with. i just want to know how you would like me to post it so that
you can help me please.

KARL DEWEY said:
I think you need your other table joined on the common field -
something like this --
SELECT [OtherTable].[UserName], Group.DirectoryName
FROM [OtherTable] LEFT JOIN [Group] ON [OtherTable].[CommonField] =
[Group].[CommonField]
WHERE [OtherTable].[UserName]=[Enter Name]

If this is still puzzling to you then post all the table and field names
with datatype and sample data.

--
Build a little, test a little.


Chris said:
SELECT Group.UserName, Group.DirectoryName
FROM [Group]
WHERE (((Group.UserName)=[Enter Name]));


KARL DEWEY said:
Open the query in design view, click on VIEW - SQL View, highlight all, copy,
and paste in a post.
--
Build a little, test a little.


:

sorry but without sounding too new to the program how do I post my SQL of the
query?

:

I expect that you are storing a number instead of a name.

Post your query SQL as Klatuu suggested.

--
Build a little, test a little.


:

yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

:

Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


:

When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

:

Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
K

KARL DEWEY

Post all the table and field names with datatype and sample data.
Post the SQL of your query.
--
Build a little, test a little.


Chris said:
ok I spent time making a data base that is similiar to the one that I have
questions with. i just want to know how you would like me to post it so that
you can help me please.

KARL DEWEY said:
They are all lookup fields.
I have one table with everyones name in it once
I think you need your other table joined on the common field -
something like this --
SELECT [OtherTable].[UserName], Group.DirectoryName
FROM [OtherTable] LEFT JOIN [Group] ON [OtherTable].[CommonField] =
[Group].[CommonField]
WHERE [OtherTable].[UserName]=[Enter Name]

If this is still puzzling to you then post all the table and field names
with datatype and sample data.

--
Build a little, test a little.


Chris said:
SELECT Group.UserName, Group.DirectoryName
FROM [Group]
WHERE (((Group.UserName)=[Enter Name]));


:

Open the query in design view, click on VIEW - SQL View, highlight all, copy,
and paste in a post.
--
Build a little, test a little.


:

sorry but without sounding too new to the program how do I post my SQL of the
query?

:

I expect that you are storing a number instead of a name.

Post your query SQL as Klatuu suggested.

--
Build a little, test a little.


:

yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

:

Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


:

When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

:

Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 
C

Chris

Table Name: Directories
directoriesID DirectoryName
1 X:\Preserve\law
2 X:\MUSEUM\dept1
3 X:\MUSEUM\dept2
4 X:\MUSEUM\dept3
5 X:\MUSEUM\dept4
6 X:\MUSEUM\dept5
7 X:\Law
Table Name: (Group)
ID Names DirectoryName Group SecurityGroupName
1 7 7 8 1
2 5 7 8 1
3 6 7 8 16
4 5 4 2 6
5 6 4 2 6
6 7 5 6 18
7 4 5 6 18
8 1 5 6 18
9 2 5 6 17
10 4 6 13 12
11 3 6 13 12
12 1 6 13 12

Table Name: (Group Field)
ID Group
1 Accounting
2 Capitol Tour Guides
3 Curatorial
4 cvc visitor Services
5 Exhibits
6 Hiring Division
7 HR
8 Law
9 Marketing
10 Museum
11 Org Chart
12 Payroll
13 Theaters
14 Web Page

Table Name: (SecurityGroupNames)
SecurityGroupNamesID SecurtyGroupName
1 law ADMIN
2 org chart ADMIN
3 org chart RO
4 accounting ADMIN
5 accounting RO
6 capitol tour guides ADMIN
7 curatorial ADMIN
8 cvc visitor services ADMIN
9 exhibits ADMIN
10 hr ADMIN
11 payroll ADMIN
12 theaters ADMIN
13 cvc visitor services RO
14 exhibits RO
15 hr RO
16 law RO
17 Hiring Divisions RO
18 Hiring Divisions Admin
19 Museum ADMIN
21 Marketing ADMIN
22 Web Page ADMIN

Table Name: (Users)
ID Names
1 Joe Bob
2 Ann Lewis
3 Anita Baker
4 Susan miller
5 Bob Parker
6 Frank Porter
7 Lewis Markenson

The Data Types for all the columns are Text. I had to delete the
relationships that were created to change the data type for the group table.
The group table is the one that I used lists from the other tables to fill
in.

SQL(Query)
SELECT Group.Names, Group.DirectoryName
FROM [Group];

Please let me know if I posted something wrong or you need something else
from me. I am not 100% sure that I did it right.

KARL DEWEY said:
Post all the table and field names with datatype and sample data.
Post the SQL of your query.
--
Build a little, test a little.


Chris said:
ok I spent time making a data base that is similiar to the one that I have
questions with. i just want to know how you would like me to post it so that
you can help me please.

KARL DEWEY said:
They are all lookup fields.
I have one table with everyones name in it once
I think you need your other table joined on the common field -
something like this --
SELECT [OtherTable].[UserName], Group.DirectoryName
FROM [OtherTable] LEFT JOIN [Group] ON [OtherTable].[CommonField] =
[Group].[CommonField]
WHERE [OtherTable].[UserName]=[Enter Name]

If this is still puzzling to you then post all the table and field names
with datatype and sample data.

--
Build a little, test a little.


:

SELECT Group.UserName, Group.DirectoryName
FROM [Group]
WHERE (((Group.UserName)=[Enter Name]));


:

Open the query in design view, click on VIEW - SQL View, highlight all, copy,
and paste in a post.
--
Build a little, test a little.


:

sorry but without sounding too new to the program how do I post my SQL of the
query?

:

I expect that you are storing a number instead of a name.

Post your query SQL as Klatuu suggested.

--
Build a little, test a little.


:

yea I have other tables that are storing other information and then I am
bringing them all together with this table. So I have one table with
everyones name in it once and then my main table has the name multiple times
so that I can show what different folders they are allowed to view. The same
applies to the other columns that are in the main table. The information all
come from other tables. They are all lookup fields. I hope that you
understand. It may be that I don't even have the database set up right. It
has been a long time since I have used access.

:

Are you using a lookup field in the table for name?

Are you storing a name or number?

--
Build a little, test a little.


:

When i did that I was propted with this "This expression os typed
incorrectly, or is too complex to be evaluated. For example, a numeric
expression may contain too many complicated elements. Try simplifying the
expression by assigning parts of the expression to valiables." Maybe I
should have also mentioned that I am trying to run this one query based off
of one table. I don't know if that changes anything or not though.

:

Open in the design view and enter this as the criteria --
[Enter name]

--
Build a little, test a little.


:

I have a database where I have people listed with two other columns of data
that goes with the name. The names are listed multiple times. I was
wondering if anyone could tell me how to run a query where I pull just one
specific person where I can look at just their information that relates to
them. I know how to make it ask for the name but I am having problems with
the syntax for the criteria that I need to write to make it give me just the
one name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Combine Duplicates in Query 0
Access Dcount (multiple criteria) 3
Omit records from MS Access 2007 query 5
Query within a report 1
I need help writing a query 12
Query - partial name 3
I need help on a query. 6
Query SQL Syntax 2

Top