[AccessD] Set Read only on Form Load

Bert-Jan Brinkhuis thevigil at kabelfoon.nl
Fri Mar 28 07:39:51 CST 2003


This is from the top of my head and not tested....

public function fcnFormLoad(frm as form)
call fcnUserGroup
if fcnUserGroup="RO" Then
frm.alloAdditions=FALSE

and so on...

HTH

Bert-Jan

----- Original Message -----
From: "Nancy Lytle" <nancy.lytle at auatac.com>
To: "Accessd" <accessd at databaseadvisors.com>
Sent: Friday, March 28, 2003 2:28 PM
Subject: [AccessD] Set Read only on Form Load


> Is it possible to create a function, like what I have below so that the
code
> can be stuck in the On Load or On Open event of any form I want?
Obviously
> the Me is the problem here but I'm not sure the easiest way to go about
> this.
>
> Thanks in advance for any guidance.
>
> Nancy Lytle
>
> Current code attempt:
>
> Public Function fcnFormLoad()
> Call fcnUserGroup
> If fcnUserGroup = "RO" Then
> Forms!Me.AllowAdditions = False
> Forms!Me.AllowDeletions = False
> Forms!Me.AllowDesignChanges = False
> Forms!Me.AllowEdits = False
> Else
> Forms!Me.AllowAdditions = True
> Forms!Me.AllowDeletions = True
> Forms!Me.AllowDesignChanges = True
> Forms!Me.AllowEdits = True
> End If
> End Function
>
> _______________________________________________
> 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