having users edit certain data

lubbs65

Board Regular
Joined
Jun 1, 2011
Messages
80
So in access I essentially have one base table. The template would look similiar to this:
name sales date
bob 100 1/1/2011
jane 200 1/1/2011
steve 200 1/1/2011
bob 100 1/2/2011

and so forth. Now, i want bob to only have the ability to edit his own data. That is to say, he cant accidentally edit jane nor steve's data, nor can he accidentally write there name when he fills something out. How can I go about doing this? I have been reading up on account security and still haven't quite grasped how i can fully control everything into the detail I want.

I've created user and group accounts for the file i am working on thinking I can then have each account do a specific task. The problems that still exist:
1) when i created the user accounts I did not realize that this user account would work for all access files rather than exclusively the particular file i was working on.
2) making the users abilities more specific. Yea i want some users to only be able to update/insert data, but how can i get them to only do it for data that follows a certain object type?
3) this one is a bit embarrassing, but how do I log in with my windows user ID? ive tried passwords but its been failing. luckily, i have an admin ID that i created and log in with that information and password and can still do everything, however I want to be able to do that with the standard user ID.

What I've tried but failed:
I was reading about the security wizard and thought I set everything up. (accounts and all). It would create the .bak file and what not. however after closing the file it would always say i do not have permission to enter it. It never prompted me to sign in to even try so I was wondering how I would be able to accomplish this (assuming it is necessary towards my overall goal described above).

Any help is much appreciated!
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
okay so a current update:
I still am having trouble logging in. I've attempted to recreate the workgroup file. I still don't really understand what to do with it once its created. say I open my file and the workgroup file and it sais i dont have admininistrative priveleges. I changed the default account "admin" to have a password because I read somewhere that you need to have to log in to avoid that issue. Now, I open the program, sign in, and then am told that I dont have administrative priveledges.... strange. luckily i have all the files backed up so I can restart all these processes at any time.

On the second problem, I did more reading trying to find out other things. So if I had a "name" category in my input form, and assuming my accounts were working properly, I could just put for a Validation rule for name under common expressions->current user->currentuser(), and it would only input names for the current user than right?! and if that is what I were to do, the account names (for currentuser()) would have to be the names used as the input? meaning for bob, his account name would have to be bob
 
Upvote 0
I've made these accounts and they seem to currently work with user level security. Now, is there a way to make it so that accounts are only neccessary for a certain file rather than all access files?

here is what i did from the beginning to give you an idea:
i had to make a copy in access 2002 format because from what i read it wasn't possible to do what I wanted in access 2007. I also did not see the options for how to. IE, in access 2007 how can you even open the security wizard? Anyway, in my 2002 format of Access I went database tools-> administer->user and group accounts. here i created a user "user1" put him in admin group, and removed the default admin from the admin group. re-opened the same file thats been in 2002 format, set up the security wizard. closed the file, reopened access again. Now I was able to actually get into the file after logging in (i was not able to do this before)!! The only problem I am having is that every other access file still requires me to log in which is a feature I do not want.
 
Upvote 0
also, in my account i created two accounts. "bob", and "jane". I want bob to only be able to edit and input forms for the name "bob". So when using the validation rule =CurrentUser(). how can I put the log in names into that phrase. This would mean that it would say "=CurrentUser(bob)" when bob is signed in, and "=CurrentUser(jane)" when jane is logged in?
 
Last edited:
Upvote 0
The only problem I am having is that every other access file still requires me to log in which is a feature I do not want.
That is likely because you either joined the new workgroup or you modified your default security.mdw which shouldn't have been done - you should have just created a new mdw with a different name.

lubbs65 said:
how can I put the log in names into that phrase. This would mean that it would say "=CurrentUser(bob)" when bob is signed in, and "=CurrentUser(jane)" when jane is logged in?
=CurrentUser() returns the user that is logged in. You don't put something into that functions parentheses. So if bob is logged in, putting

=CurrentUser()

will show

bob

in the textbox.
 
Upvote 0
That is likely because you either joined the new workgroup or you modified your default security.mdw which shouldn't have been done - you should have just created a new mdw with a different name.

How can I go about restoring the default. It's very well possible that this is the source of most of my errors. The link you provided earlier seems very helpful btw. After restoring the account, I'm assuming I can do the following: change the admin back to just a user, making a standard admin who can do whatever. then i open the security wizard and this time choose a second name rather than the default. Then in the security wizard, is this where I should create more users? Or, should I create new users under "User and Group Accounts"? Or does it not matter?


=CurrentUser() returns the user that is logged in. You don't put something into that functions parentheses.
I've been trying this and it's been continuously outputting the validation text and not allowing me to continue. Here's what's wrong:
If i enter say "bob" into a text box it understands it. saying "sally" outputs an error. putting "bob" into a combo box however still outputs an error. Inevitably, I need this to work for combo boxes.

I am still trying to figure out how to get around this.
Also, im going to have an account "admin2". This account can edit anything. So once i figure out the solution to the first part above, I would be able to do something like "= CurrentUser() Or =CurrentUser(admin2)" meaning, if it isn't admin2 signed in, they can only input there name, however, if admin2 is online, he or she can edit it however they would like.

Thank you so much for the assistance.
 
Upvote 0
I figured out how to get the proper log in account information. One Question that goes with it though: Is there a way to set up these accounts for Access 2007? I was doing reading and it said that the file type for access 2002 and prior (.mdb and such) allowed it but 2007 did not. In 2007 I wasn't even able to locate the security window. If you could elaborate that would be great.

As far as part 2 goes:
Now I simply need to find a way to force the combo box to allow = CurrentUser() and have an exception for any admin
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,738
Members
452,940
Latest member
Lawrenceiow

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top