Security in Forms - Restricting Access to Entries Made by Other Me

D

Dennis _M

I have a database into which several people will be able to enter data
through a form. What I wish to do is block database members from seeing
entries by other database members. Database members do have an id and
password to enter the database, but how do I limit their ability to their own
entries? I only wish to use the one form - one of the controls does identify
the member.

Does anyone have some ideas?
 
P

Pieter Wijnen

Add to the where clause
WHERE ...
AND MyCreatedByField=CurrentUser()

hth

Pieter
 
D

Dennis _M

Pieter,
Here I demonstrate my lack of knowledge. How do I use an SQL statement
within a form?

Actually I have two forms. The first is an opening form. Once the member has
signed in (including password), they have access to the database (I have
placed restrictions on what they can add or change). When they go to the
form, they can see all entries in the form. This is what I wish to restrict.
I would like each individual to see only what they have created in the form.

Am I being clear, or do I need to explain further? I could make individual
forms for each member, it's not hard to do, but I was thinking there is a
more efficient method. Downstream are the queries that feed the reports for
each member.
 
P

Pieter Wijnen

Ok, I presume you keep the LoginName in a Form (switchboard) that is open at
all times
If you base it on a table directly, change to a query
In the Query grid add: Forms!Switchboard!LoginName in the criteria line
under the field containing the loginname of the user (MyCreatedByField).

this will, if you switch to SQL view look like:
WHERE MyCreatedByField = Forms!SwitchBoard!LoginName

with a lot of extraenous ()

you have to exchange the names for whatever field, form & control you're
actually using

hth

Pieter
 
Top