[AccessD] Set Read only on Form Load

Nancy Lytle nancy.lytle at auatac.com
Fri Mar 28 07:28:18 CST 2003


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



More information about the AccessD mailing list