Table Security Issue

johnyjassi

Registered User.
Local time
Today, 02:59
Joined
Jun 6, 2008
Messages
64
Hi Experts,

I created my own security code on database, that without entering right username or password, no body can enter. But entered person can close the form window and can access tables. I hide the tables by changing its name with prefix "Usys". and disabled the menu. But what if somebody knows how to use shift+enter thing and can access my tables. Is there any other method that prevents users to made changes to the table contents. Multi user enviornment, All should be able to add, modify, update through forms only, not directly to tables
Thanks in advance, Any help would be appreciated.
 
Consider implementing User Level Security. Google/search the forum for that keyword; there's several threads on how to implement ULS in any Access database.
 
Use some VBA code to prevent users from being able to close the form window...

There are plenty of samples in archives that will allow you to do this.

If you require access to more than one form - Consider merging the forms into a Tabulated format.

Users would be able to browse the forms using your tabs but still be unable to close the form as a whole.

On that note, ideally the data should be seperated into a "Back-End" database which will contain all your data.

Users should only have access to a "Front-End" which contains only the forms that are linked to the back end data.
 
Could you please explain it. or elaborate it. If we implement user level security. If we invoke all Add, Delete, update on table from user, It would apply that thing on the form as well. user wouldn't be able to make changes through the form too. please advice
 
User level security basically means you secure a database using a workgroup security file that defines what permissions a given user or group has to various objects. If properly secured, you can deny permissions for an average user to open or create tables while allowing him to use forms where you can control how data are validated and so forth.

Here's a quite excellent PDF that will get you started..
 
skaas,

I like your idea but I tried for that, but couldn't find it, If you know any link can you post it. I will appreciate it.
 
Just so you know, VBA code won't necessarily stop a dedicated user trying to break the security and can be circumvented, whereas ULS is much more harder to circumvent.
 
General

Here is a quick fix solution to your problem

Please place the following code into your Forms Load area



Code:
Private[SIZE=2][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=2] Form1_Load([/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] sender [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.Object, [/SIZE][SIZE=2][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=2] e [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.EventArgs) [/SIZE][SIZE=2][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]MyBase[/COLOR][/SIZE][SIZE=2].Load[/SIZE]
[INDENT][LEFT][SIZE=2][COLOR=#0000ff]Me[/COLOR][/SIZE][SIZE=2].ControlBox = [/SIZE][SIZE=2][COLOR=#0000ff]False[/COLOR][/SIZE][/LEFT]
 
 
 
[/INDENT][SIZE=2][COLOR=#0000ff]End[/COLOR][/SIZE]
[LEFT][COLOR=#0000ff][SIZE=2]Sub[/SIZE][/COLOR][/LEFT]

(Don't forget to change the caption Form1_load to the name of your actual form)

Working with VBA it is possible to achieve your function, most of the usually asked questions have answers on the MSDN.​

For more details on using VBA to prevent users closing forms - Please refer to the link below.​



Generally most day to day users of Access will not be able to interpret or circumvent the code , however as Banana has correctly pointed out, a dedicated and particularily malicious user may just do that.​

Use the quick fix provided here if you wish - Though I would tend to agree that incorporating a ULS would be far more efficient, the quick fix provided should hopefully provide you with enough time to research ULS more thoroughly......​

There is no "Easy way" to fully secure your database - it will take time, paitence and practise...​

I recommend reading the following artical in its entirety....​


Take your time and try not to become frustrated, only with experience will you learn all the aspects of Database creation.​

I know personally that I myself have a long, long way to go....​

Be very careful when setting up a ULS - it is easy to lock yourself out of the database if you do not follow everything absolutely perfectly.​

It is true that ULS is the correct, formal and most secure way of protecting your database.... However it is also the easiest way of making mistakes, if you are not extremely careful.​

Locking yourself out of your own database is no laughing matter.​

Read a lot, take your time, take it one step at a time, test every step on a COPY of the database, Never edit the live database, keep several backups, use a front-end linked to a bank-end, set up a ULS, set unique users and passwords for every intended user and bite your tounge an awful lot.​

I hope this helps even a little bit.....​

All the best​
 
Last edited:
Unfortunately, I have to agree with Skaas regarding his assessment that ULS is probably most easiest way to get yourself tangled up in the web of security and would second his suggestion that you take time to read through everything, and play with a throwaway database so you can understand the mechanism. I know I've been bit in the ass more than once with carelessly set-up ULS.

One more thing to consider: You indeed can disable the control box (and without code; it's in the Properties Windows, under Format tab, just need to scroll down a bit) but this may have the undesired effect of your users giving your application the three-fingered salute. You'll have to decide if this is worth the risk.

Good luck.
 
Hi Guys,

I worked on ULS over this week end. After so many tries I implemented it. You are right, experience and practice makes anybody perfect. Thanks to you guys I am learning even more.
 

Users who are viewing this thread

Back
Top Bottom