K
KARL DEWEY
What you posted is good. I will have to build the tables and populate and
then work on the queries.
It may be a day or two before I get back.
--
Build a little, test a little.
then work on the queries.
It may be a day or two before I get back.
--
Build a little, test a little.
Chris said: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.
:
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.