is it possible to let user only view data under their name in acce

  • Thread starter Thread starter Ming
  • Start date Start date
M

Ming

I have a database and it has multiple users. For all the tables inside that
database, they all have a column records user's name. What I want is once the
user login, he/she only can see the records with his/her name. It just like
those online shopping website, once you login, you only can see your owner
data. Is this possible for an access database?
 
On Thu, 21 Feb 2008 13:58:00 -0800, Ming

Yes, but you have to write the queries:
select * from SomeTable
where UserID = Forms!SomeForm!UserID

In this example I have a form named SomeForm with a (potentially
hidden) control named UserID (or UserName, if you must) which the
query looks at to filter the records down to the ones for that user.
Of course you have at startup time populated this field with the
user's ID (or name, if you must)

-Tom.
 
Hi Tom,

Thank you for your reply. My question is in order to do that, all the user
will have permission to run that query which means they can directy goto the
query instead of using the form if they want to. Then they can see others
records only if they know others ID, right (most ID here are their name and
it is very easy to get)? I don't want user A see user B's data. Maybe I
should attached each user's password to the query? But still, I heard that
store the UserID/password inside the main database is not very secure.
 
Back
Top