Solved Secure tables on Access (1 Viewer)

Springblossom

Member
Local time
Today, 15:20
Joined
Jan 18, 2022
Messages
55
Hi dear Access friend,

1.What is the best way to secure a table from data being deleted by front end user?
It means that a couple of admins can delete the data but not others. Others can only enter data and edit it, not deleting it.

2. How can the admin keep a back up from database every night, so if there are changes the next day, this version is always a secure back-up.
 

Ranman256

Well-known member
Local time
Today, 09:20
Joined
Apr 9, 2015
Messages
4,337
Use forms that only show users the data in read-only queries. (snapshot setting)
If they need to edit ,set the form property to DELETE RECORDS = FALSE
lock down the db, so they cannot get direct access to the tables.

i have an event timer (windows or access) that makes a copy of the db everyday...to: db_yymmdd_hhnn.accdb
 

oleronesoftwares

Passionate Learner
Local time
Today, 06:20
Joined
Sep 22, 2014
Messages
1,159
1.What is the best way to secure a table from data being deleted by front end user?
It means that a couple of admins can delete the data but not others. Others can only enter data and edit it, not deleting it.
Creating user categories, and permissions is one way, so when a user logins in, the permissions attached to his account is what will determine what can be done.
2. How can the admin keep a back up from database every night, so if there are changes the next day, this version is always a secure back-up

You can use windows backup functionality(this is a tool in windows operating system) to back up automatically or manually at specific time.

What Windows operating system versions is on the systems?

Finally how is the application deployed, is it on multiple systems?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 08:20
Joined
Feb 28, 2001
Messages
27,191
Basically, if your users can see the navigation panel, they own the DB. You can look up the topic "Secure a Database" in this forum. You will find many articles. Most of them emphasize that you must NEVER show the users tables, queries,macros, and modules. Only forms and reports. And even there, you would use a switchboard or dispatcher or other type of controlling form.

How you handle the admin staff is up to you, but the way I did it was that I had a dispatcher form that had a role-sensitive button. In the form's OnLoad routine, I determined the user's role and if the person was an admin, I had a button that would be made visible and enabled to close the dispatch form, revealing what was "behind the scenes." There are other ways to do that, but that idea worked for me.
 

MarkK

bit cruncher
Local time
Today, 06:20
Joined
Mar 17, 2004
Messages
8,181
2. How can the admin keep a back up from database every night, so if there are changes the next day, this version is always a secure back-up.
Program the FE to make dated copies of the BE. Do this on milestone events in the lifetime of the FE, like on startup, shut down, or when the user takes a particular action.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 08:20
Joined
Feb 28, 2001
Messages
27,191
There is also the possibility (if your site allows Windows Task Scheduler) to create a database macro that would make this copy for you. In fact, the DB to do this doesn't have to be the same as the DB your users run because you really don't need to map tables. You would be doing a whole-file copy operation.

Doing it the DB way, you create a macro that does a run-code action. The code that it runs simply uses the FileSystemObject facilities to copy a file from point A to point B. You can generate a timestamp to rename the backup copy using Name As to change it from MyDB to MyDB_ddmmyyyy or something like that. And you can run a macro from the Windows Task Scheduler by launching your DB with the /X:macro-name command line option. IF you use a macro, it must end with the Application.Quit macro command so that you don't leave a dangling copy.

OR you could use a simple command script, since there is nothing magic about making a backup copy. It is just a copy that - at most - might have a name with a date in it. If you use a simple CMD script, or perhaps a VBscript, you just schedule the script to run at some particular time of day, once a day, from one AND ONLY ONE machine.

Down side? At least the machine running the script and the machine hosting the BE must both be on at the scheduled time. Though you CAN run a VB script on the system hosting your DB, usually.

There is another question here... by any chance does your site have a daily backup done by night operators? (You didn't specify the size of your shop so we can't know what resources are available.)
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:20
Joined
Feb 19, 2002
Messages
43,293
If you have a network, it should have a back up schedule. Your Access apps need to be included in that schedule. You need to do some testing to make sure that you can actually get the backup db from the backup file.

Additionally, I would suggest looking at the tools on FMSINC.com for scheduling backups.
 

Users who are viewing this thread

Top Bottom