|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Re: How can I disable SHIFT+ENTER only for certain users in a MsAcHow can we run your code? I try, but I don't know which values I must give to strPropName, varPropType, varPropValue. Could you explain to me the steps to run this code? Thanks a lot, José Perdigão Show quoteHide quote "Geo" wrote: > Yeaaaaah!!! > Here is a solution: > > Option Compare Database > Option Explicit > > > Public Function dd() > If CurrentUser() <> "admin" Then > If CurrentUser() <> "ChosenUser" Then > ChangeProperty "AllowBypassKey", dbBoolean, False > Else > ChangeProperty "AllowBypassKey", dbBoolean, True > DoCmd.Quit > End If > Else > ChangeProperty "AllowBypassKey", dbBoolean, False > DoCmd.Quit > End If > > End Function > Function ChangeProperty(strPropName As String, varPropType As Variant, > varPropValue As Variant) As Integer > Dim dbs As Database, prp As Property > Const conPropNotFoundError = 3270 > > Set dbs = CurrentDb > On Error GoTo Change_Err > dbs.Properties(strPropName) = varPropValue > ChangeProperty = True > > Change_Bye: > Exit Function > > Change_Err: > If Err = conPropNotFoundError Then ' Property not found. > Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue) > dbs.Properties.Append prp > Resume Next > Else > ' Unknown error. > ChangeProperty = False > Resume Change_Bye > End If > End Function > > (C) Mitrica Dan > > >
Report of database object permissions
Security file not holding changes Some users have to rejoin workgroup daily, why? macro security error message New to security have questions before plunging how to secure a new db with an existing .mdw Assign a workgroup to a workspace object - Thanks to Paul Overway Opening MDB with and a workgroup file. Reuse Secured.MDW file? Workgroups & Distribution of my Application |
|||||||||||||||||||||||