Question Login and backup for access 2007

Pusher

BEOGRAD Put
Local time
Today, 06:41
Joined
May 25, 2011
Messages
230
Hi y'all,

How to make multiple user accounts that can login with logs of logins and different administration rights for my access 2007 db. Maybe i can use some outside program for loging in and making logs of use.
Also how to make an automatic backup of a db.
 
Are you saving your database as and Access 2007 database or as 2003? If 2003 you can add the ICON to quick access toolbar to setup usergroups and users.

If you also want to log which users have logged in etc then look at the sample database here as there are some samples available.
 
I find a simple .bat file in windows scheduled tasks as the easiest and most robust method of doing local (i.e. small scale rather than a big IT orperation) backups.

As for the user logins, I use 2003 and have always created my own user / login system. I hear 2007 has one which can be enabled but I don't use it so can't really help with that.
 
Can you send me your .bat file so i can use it on my sistem ? thanks
 
Do you have some tutorial for making users and permissions for access 2007?
 
Not sure how well it would let me attach .bat files, so here's the code instead:

Code:
set dd=%Date:~0,2%
set mm=%Date:~3,2%
set yy=%Date:~6,4%
set ddy=%Date:~0,2%
set mmy=%Date:~3,2%
set yyy=%Date:~6,4%
set /A ddy -= 4
if %ddy%==0 set /A mmy-=1
if %mmy%==0 (
 set mmy=12
 set /A yyy-=1
)
if %ddy%==0 (
 if %mmy%==12 set ddy=31
 if %mmy%==11 set ddy=30
 if %mmy%==10 set ddy=31
 if %mmy%==9 (
  set ddy=30
  set mmy=09)
 if %mmy%==8 (
  set ddy=31
  set mmy=08)
 if %mmy%==7 (
  set ddy=31
  set mmy=07)
 if %mmy%==6 (
  set ddy=30
  set mmy=06)
 if %mmy%==5 (
  set ddy=31
  set mmy=05)
 if %mmy%==4 (
  set ddy=30
  set mmy=04)
 if %mmy%==3 (
  set ddy=31
  set mmy=03)
 if %mmy%==2 (
  set ddy=28
  set mmy=02)
 if %mmy%==1 (
  set ddy=31
  set mmy=01)
)
set DateToday=%yy%_%mm%_%dd%
set DateYesterday=%yyy%_%mmy%_%ddy%
set BackupPath=\\BACKUPSERVER\BACKUPFOLDER\
set LivePath=\\LIVESERVER\LIVEFOLDER\
set LiveFile=%LivePath%Staff ^& Risk DB_v2003.mdb
set DefaultBackup=%BackupPath%Staff ^& Risk DB_v2003.mdb
set NewBackup=Staff ^& Risk DB_v2003 %DateToday%.mdb
set OldBackup=%BackupPath%Staff ^& Risk DB %DateYesterday%.mdb
del /q "%OldBackup%" 2>NUL
xcopy "%LiveFile%" "%BackupPath%" /c /r /d /y /i > "%BackupPath%xcopy2003.log"
rename "%defaultBackup%" "%NewBackup%"

It copies my database to another network drive, then renames it to include a date suffix so I can restore whichever day's data I need.

:edit:

The code at the beginning to capture different parts of the date may be tied to my localisation as a UK English PC.
 
So im using just this code
set DateToday=%yy%_%mm%_%dd%
set DateYesterday=%yyy%_%mmy%_%ddy%
set BackupPath=\\BACKUPSERVER\BACKUPFOLDER\
set LivePath=\\LIVESERVER\LIVEFOLDER\
set LiveFile=%LivePath%Staff ^& Risk DB_v2003.mdb
set DefaultBackup=%BackupPath%Staff ^& Risk DB_v2003.mdb
set NewBackup=Staff ^& Risk DB_v2003 %DateToday%.mdb
set OldBackup=%BackupPath%Staff ^& Risk DB %DateYesterday%.mdb
del /q "%OldBackup%" 2>NUL
xcopy "%LiveFile%" "%BackupPath%" /c /r /d /y /i > "%BackupPath%xcopy2003.log"
rename "%defaultBackup%" "%NewBackup%"

DB_v2003.mdb - this is the name of my DB and this BAT file will open and back it up?
 
Code:
set LivePath=\\LIVESERVER\LIVEFOLDER\ 
set LiveFile=%LivePath%Staff ^& Risk DB_v2003.mdb

The file being copied is "Staff & Risk DB_v2003.mdb" on the server called LIVESERVER within a folder called LIVEFOLDER
 

Users who are viewing this thread

Back
Top Bottom