Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Password control

Status
Not open for further replies.

Parkroyal

Technical User
Jan 15, 2004
45
0
0
GB
I would like to pasword protect certain controls in my Access db, namley a text control box and a tabsheet control.

The textbox needs to have it's value visable at all times but only certain users able to change it's contents.

The tabsheet control needs to only be visable on the entry of a password.

Can anyone tell me of the best way to achieve this please.

Many Thanks
 
Do you have any form of security set up currently on the database?

You could actually do several things (Please understand I don't use Access's security, I create my own, so the following is based on that):

1. Set up your own version of security. Create a login form and set it as the startup screen. Create a global variable for "Group" and set up a couple of groups like "user", "Manager" etc. Capture the global variable for use throughout your app. Then set up code so that when the form opens the user gets to see or do only what is allowed for that group. (example: If pstrGroup = "User" then me.tabctrl0.visible = false)

2. Do the same as number 1 only instead of having the user log in to the application, have them log into the form. Again, set up your permissions on the OnOpen function.

3. You could also write code on the GotFocus of the field but that wont do you any good for making your tab control not visible.

I have examples of this if you want me to send you a sample. I could e-mail it to you if you want.

Hope this helps and wasn't too vague!

Good luck,

Brenda
 
Hi Brenda

Thanks

No not to vague and given me food for thought.

what I am trying to protect is sensitive information that (a) only certain people can see and (b) only certain people can change.

Other people can see the screens so information like credit card details etc do not need to be on open disply.

I think I have figurd a way to do it by using a button to demand a password and setting the tab control sheets visable property to visable with correct password. However I'm a complete novice at code so your examples may be useful.

Thanks again

my e-mail

parkroyalcs@hotmail.com
 
Yep that should work great.

Good luck and I sent you the sample.

Let me know if you have any trouble with it.

Brenda
 
Parkroyal

With things like that, unless the data are encrypted within the tables, there is still ways of getting to it. eg:

- press F11 to open the database window, navigate to the table and open it, then you see the raw data.

- write a query to select fields from the data

- load it into excel through Data -> Import external data

- read it into a third party app (eg crystal reports) through an ODBC connection.

Unless you secure the table itself through access security or encrypt the data itself in the table, your own security method can easily be overcome.

John
 
Yes i am aware of that but it's not so much a problem with unauthorised people outside of our employ gaining access to keyboards it's more of a visual problem . There is only a maximum of 4 employees in this office and anyone who shouldn't be messing with anything behind a barrier is easily spotted and sorted ------ the office is never unattended so the main wory is with clients seeing data they shouldn't when they peer round the corner of a screen. If one of the opperators inadvertantly leves a screen open and in view then personal details could be compromised.

By making the sensitive screens not visable except under certain conditions and then putting an inactivity timer on them this negates this problem.

locking a control to a password is just so that no one can change a discount field on a customer record by mistake.

and any way my opps don't have a clue so them finding a way around a simple password control even if they wanted to would be beyond them. This is not an app for comercial distribution it is for my own company and no one else.

But thanks for your input and, if I do need to beef up security for any reason I will try this out. (I may well play with it anyway just for fun)

Thanks guys
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top