Low level protection

  • Thread starter Thread starter Bruce
  • Start date Start date
B

Bruce

I have designed a database for keeping track of training
records. Information about each training session is in
one table, and attendance is in another. The user
interface is form (session)/subform (attendance).
The database will be placed in a newtwork folder with
limited access. Data security is not really an issue, but
I would like to guard against accidental deletions, etc.
I know that I can set Allow Deletions, Allow Edits, etc.
to No. However, sometimes it is necessary to edit the
record, particularly the Attendance information.
Ideally I would protect some fields and not others. I
would like to be able to add records through the
Attendance subform (each attendee, date, etc. is a
separate record) while protecting the information in the
main form. At the same time, I would like for there to be
a way to edit the main form, perhaps by clicking a command
button.
I have looked at a document from the MS web site about
user level security, but I don't see an answer in that
direction. I can only sketch what I am trying to
accomplish, and hope that somebody out there can point me
in the right direction.
 
Why don't you create two forms. One to edit/delete, and one to add or view.

The edit/delete one could prompt the user for a password when it is opened
(if you even feel you need to do that).

Users would work in the safer form most of the time, but would open the
other if needed.

Not a real safe option, but will help avoid accidents.

Also, backup often. We store our databases on a LAN that is backed up
nightly.

Rick B

I have designed a database for keeping track of training
records. Information about each training session is in
one table, and attendance is in another. The user
interface is form (session)/subform (attendance).
The database will be placed in a newtwork folder with
limited access. Data security is not really an issue, but
I would like to guard against accidental deletions, etc.
I know that I can set Allow Deletions, Allow Edits, etc.
to No. However, sometimes it is necessary to edit the
record, particularly the Attendance information.
Ideally I would protect some fields and not others. I
would like to be able to add records through the
Attendance subform (each attendee, date, etc. is a
separate record) while protecting the information in the
main form. At the same time, I would like for there to be
a way to edit the main form, perhaps by clicking a command
button.
I have looked at a document from the MS web site about
user level security, but I don't see an answer in that
direction. I can only sketch what I am trying to
accomplish, and hope that somebody out there can point me
in the right direction.
 
You can set the AllowDeletions, AllowEdits, etc = False, then add a button
that would allow users to enable that functionality:

In the button's Click Event:

Me.AllowEdits = True
or
Me.AllowDeletions = True

--
Scott McDaniel
CS Computer Software
Visual Basic - Access - Sql Server - ASP

"Smash forehead on keyboard to continue ... "
 
I thought about that, but the trouble would be (without
going into a lot of details) that in many cases there will
be almost as much modifying of existing records as
creating of new records (for instance, when another person
receives training they would be added to the Attendance
list). Maybe I am inventing a problem where it does not
exist, but it seemed like going back and forth between
forms would have been a hassle if the person forgot which
form they were in. I know they could be made to look
different, etc., but I envisioned difficulties. Thank you
for taking the time to reply.
 
Thanks for the reply. My database's main form describes a
training session, and the subform lists the attendance.
While Allow Edits was set to No I could enter data in the
main form, but could not even see a field in the subform.
It also had the effect of prohibiting me from using combo
boxes to filter the records (I could not select an item
from the combo box). I ended up adapting your idea by
adding AllowEdits = False and AllowEdits = True to various
events. For instance, the Got Focus event for the search
combo boxes included Allow Edits = True, and Lost Focus
was the reverse. This approach has the additional benefit
of allowing edits of the subform at all times, which is
the place I really needed the option. You got me pointed
in the right direction.
 
Back
Top