How to open all subforms in read only status

How to open all subforms in read only status

am 06.11.2007 18:23:34 von Bob Alston

Any straightforward way to open a form with multiple subforms, where the
main form and all subforms are opened in readonly status?

If I run
docmd.openform.......,acreadonly

the main form is readonly but the subforms are in their normal,
readwrite status?

bob

Re: How to open all subforms in read only status

am 06.11.2007 18:36:06 von Stuart McCall

"Bob Alston" wrote in message
news:qp1Yi.48$zj4.16@newsfe02.lga...
> Any straightforward way to open a form with multiple subforms, where the
> main form and all subforms are opened in readonly status?
>
> If I run
> docmd.openform.......,acreadonly
>
> the main form is readonly but the subforms are in their normal, readwrite
> status?
>
> bob

Set all the subform controls' Enabled property to No in the property sheet.
That means the box on each tab which hosts the subform, not the subform
itself.

Re: How to open all subforms in read only status

am 06.11.2007 19:33:47 von Davidb

On Nov 6, 12:23 pm, Bob Alston wrote:
> Any straightforward way to open a form with multiple subforms, where the
> main form and all subforms are opened in readonly status?
>
> If I run
> docmd.openform.......,acreadonly
>
> the main form is readonly but the subforms are in their normal,
> readwrite status?
>
> bob

Set the AllowEdits, AllowAdditions, and AllowDeletions properties of
each form object to false. This way the user can still select fields
but they cannot modify them. Even without eidt capabilities at any
level, it is often helpful to end users to be able to select a field.
You can also set these properties at run time based on rights you have
granted to a user through many methods.