dbTalk Databases Forums  

Design approach for users authorized to edit data

comp.databases.ms-access comp.databases.ms-access


Discuss Design approach for users authorized to edit data in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bob Alston
 
Posts: n/a

Default Design approach for users authorized to edit data - 03-11-2010 , 07:09 PM






For systems you build, when presenting forms where data can be viewed
and, for authorized users, edited. Do you present the form in read only
mode initially for all users and require the authorized user to click a
button to enter "edit mode" and allow edits?

My own practice was to allow edits at all times for authorized users and
ask them to be careful.

I just want to see what other developers do as a standard.

Reply With Quote
  #2  
Old   
Allen Browne
 
Posts: n/a

Default Re: Design approach for users authorized to edit data - 03-11-2010 , 10:11 PM






Bob, if you are only concerned about users accidentally modifying the data
(i.e. carelessness, not malice), it makes sense to bring up the form locked
with a button to unlock it for edits.

In experimenting with this approach, I found that setting a form's
AllowEdits to False had undesirable side effects (e.g. unbound controls
can't be edited either), so I created a routine that sets the Locked
property of the bound controls. It also calls itself recursively to
lock/unlock subforms (including subforms nested to any depth.) And it takes
optional arguments that let you specify controls that should not be
locked/unlocked (including subforms if you wish.)

The routine is copy'n'paste stuff you can reuse on any form just by setting
a couple of properties. You're welcome to it:
Locking bound controls on a form and subforms
at:
http://allenbrowne.com/ser-56.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"Bob Alston" <bobalston9 (AT) yahoo (DOT) com> wrote

Quote:
For systems you build, when presenting forms where data can be viewed and,
for authorized users, edited. Do you present the form in read only mode
initially for all users and require the authorized user to click a button
to enter "edit mode" and allow edits?

My own practice was to allow edits at all times for authorized users and
ask them to be careful.

I just want to see what other developers do as a standard.

Reply With Quote
  #3  
Old   
Bob Alston
 
Posts: n/a

Default Re: Design approach for users authorized to edit data - 03-11-2010 , 10:32 PM



Allen Browne wrote:
Quote:
Bob, if you are only concerned about users accidentally modifying the
data (i.e. carelessness, not malice), it makes sense to bring up the
form locked with a button to unlock it for edits.

In experimenting with this approach, I found that setting a form's
AllowEdits to False had undesirable side effects (e.g. unbound controls
can't be edited either), so I created a routine that sets the Locked
property of the bound controls. It also calls itself recursively to
lock/unlock subforms (including subforms nested to any depth.) And it
takes optional arguments that let you specify controls that should not
be locked/unlocked (including subforms if you wish.)

The routine is copy'n'paste stuff you can reuse on any form just by
setting a couple of properties. You're welcome to it:
Locking bound controls on a form and subforms
at:
http://allenbrowne.com/ser-56.html

Thanks Allen. You provided easy to use code to allow me to open up any
form as locked and easily unlock it.

However, I am still interested in what other developers actually do.

bob

Reply With Quote
  #4  
Old   
jbguernsey
 
Posts: n/a

Default Re: Design approach for users authorized to edit data - 03-12-2010 , 04:58 AM



On 12 Mar, 03:32, Bob Alston <bobalst... (AT) yahoo (DOT) com> wrote:
Quote:
Allen Browne wrote:
Bob, if you are only concerned about users accidentally modifying the
data (i.e. carelessness, not malice), it makes sense to bring up the
form locked with a button to unlock it for edits.

In experimenting with this approach, I found that setting a form's
AllowEdits to False had undesirable side effects (e.g. unbound controls
can't be edited either), so I created a routine that sets the Locked
property of the bound controls. It also calls itself recursively to
lock/unlock subforms (including subforms nested to any depth.) And it
takes optional arguments that let you specify controls that should not
be locked/unlocked (including subforms if you wish.)

The routine is copy'n'paste stuff you can reuse on any form just by
setting a couple of properties. You're welcome to it:
* *Locking bound controls on a form and subforms
at:
* *http://allenbrowne.com/ser-56.html

Thanks Allen. *You provided easy to use code to allow me to open up any
form as locked and easily unlock it.

However, I am still interested in what other developers actually do.

bob- Hide quoted text -

- Show quoted text -

For many years I have programmatically locked/unlocked controls on
forms. This to prevent accidental editing, nothing to do with
security. I set the tag property to 'Edit' (arbitrary choice of text)
on those controls I want to lock and I programmatically lock them in
the On Current event of the Form. I have a routine that runs when the
user clicks on a particular label (which has the caption Unlock,
amazingly) that unlocks these controls. On a continuous Form I offer
an option (tick box) to keep the controls unlocked cos it is VERY
annoying to have to keep unlocking every time you move to a different
row!

I found the setting the Form properties (the AllowEdits property) was
too blunt a weapon. The above works for me and my clients are happy
with it.

JB

Reply With Quote
  #5  
Old   
hbinc
 
Posts: n/a

Default Re: Design approach for users authorized to edit data - 03-12-2010 , 11:41 AM



On Mar 12, 1:09*am, Bob Alston <bobalst... (AT) yahoo (DOT) com> wrote:
Quote:
For systems you build, when presenting forms where data can be viewed
and, for authorized users, edited. *Do you present the form in read only
mode initially for all users and require the authorized user to click a
button to enter "edit mode" and allow edits?

My own practice was to allow edits at all times for authorized users and
ask them to be careful.

I just want to see what other developers do as a standard.
Hi Bob,

Though some continuous forms still have AllowEdits = False, in fact I
do not use this property any more.
While loading any form, reference is made to a Field_tbl, where all
characteristics of the fields are defined. With this information I can
decide, depending on the circumstances ànd the user authorization
level, whether the field is available in the form, and wether it is
Locked or not.
Of course, when at least one field is not Locked, AllowEdits must be
True.

So, my final goal is to have all AllowEdits = True.

I do not use any unlock routines. In continuous forms you have
normally no edit-rights (for safety reasons), so you can only view the
records.
With a special control you can go to the single record form. I you
have rights to edit certain fields, these controls are unlocked, and
you can edit them.


HBInc.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.