Mike and Doris Manning
mikedorism at ntelos.net
Fri Mar 28 07:39:56 CST 2003
Pass in the name of the form... Public Function fcnFormLoad(strForm AS String) Call fcnUserGroup If fcnUserGroup = "RO" Then Forms(strForm).AllowAdditions = False Forms(strForm).AllowDeletions = False Forms(strForm).AllowDesignChanges = False Forms(strForm).AllowEdits = False Else Forms(strForm).AllowAdditions = True Forms(strForm).AllowDeletions = True Forms(strForm).AllowDesignChanges = True Forms(strForm).AllowEdits = True End If End Function Doris Manning Database Administrator Hargrove Inc. www.hargroveinc.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Nancy Lytle Sent: Friday, March 28, 2003 08:28 AM To: Accessd 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