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.