[AccessD] can't select data in control when AllowEdit false

Asger Blond ab-mi at post3.tele.dk
Fri Sep 10 08:17:22 CDT 2010


Yes, a snapshot also prevent add and delete.
To set the Snapshot type when the form opens (leaving the type as Dynaset in design) you can use this statement for the Form_Load event:
RecordsetType = 2
Asger

-----Oprindelig meddelelse-----
Fra: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] På vegne af jwcolby
Sendt: 10. september 2010 14:59
Til: Access Developers discussion and problem solving
Emne: Re: [AccessD] can't select data in control when AllowEdit false

Asger,

Now that is a solution to think about!

I will have to take a look at whether my code can do that to the form as the form opens. My PLSS 
reads information about what groups are allowed to perform the various activities in a form.  While 
it seems unlikely to occur in real life, the objective is to easily and intuitively allow specific 
groups to have the authority to add, delete and edit records.

In theory a group could be allowed to delete or add, but not allowed to edit.  A snapshot would 
prevent the edit but would also prevent the add or delete (I think).

John W. Colby
www.ColbyConsulting.com

On 9/10/2010 8:27 AM, Asger Blond wrote:
> John,
> If this is not a multiuser db you could set the forms Recordset Type to Snapshot, which will effectively prevent edits but leave all controls selectable.
> Asge
>
>
> -----Oprindelig meddelelse-----
> Fra: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] På vegne af jwcolby
> Sendt: 10. september 2010 13:42
> Til: Access Developers discussion and problem solving
> Emne: Re: [AccessD] can't select data in control when AllowEdit false
>
> Yes, that is a workaround, and I have used that workaround.
>
> Now you have a form with 200 controls on it...
>
> In the specific case I just ran into, the form itself is bound, but I have a list box that I
> populate programmatically that is not bound to any data field.  I want to not allow the user to edit
> the data in the form, but select one or more items in the list in order to push a button to cause
> something to happen.  Setting the form.AllowEdit false locks my list, even though the list is not
> even bound to data.
>
> Silly in my humble opinion.
>
> I am writing a Presentation Level Security System.  It is not uncommon to want to prevent the user
> from editing the data in the form and yet perform activities on the form.  But with the Access
> system, if I just set the AllowEdits false it pretty much locks down the form.  NOT my intention!
>
> So now I have to decide whether the user will be wanting to perform some activity on the form and
> NOT set the AllowEdits property but instead lock down just the controls that can modify the data.
>
> Pretty darned silly in my humble opinion.
>
> John W. Colby
> www.ColbyConsulting.com
>
> On 9/10/2010 7:06 AM, Stuart McLachlan wrote:
>> Set the form to allow edits but set individual controls to Enabled = Yes and Locked = Yes?
>>
>> On 10 Sep 2010 at 6:37, jwcolby wrote:
>>
>>> I had forgotten this.
>>>
>>> Is there a way around it?  It is not uncommon to not allow the user to
>>> edit the form's underlying record and yet need to click a button or
>>> select an item from a list.
>>>
>>> --
>>> John W. Colby
>>> www.ColbyConsulting.com
>>> --
>>> AccessD mailing list
>>> AccessD at databaseadvisors.com
>>> http://databaseadvisors.com/mailman/listinfo/accessd
>>> Website: http://www.databaseadvisors.com
>>>
>>
>>
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list