|
 |
access thread: hidding Tables
Message #1 by "Ahmed Khamis" <Ahmed.Khamis@v...> on Fri, 26 Jul 2002 12:14:53 +0200
|
|
Good day All;
How can I prevent other users from either viewing or editing the
tables of an MDE file
Best regards,
Ahmed Khamis
Vodafone Egypt
Customer operation
Mob: xxx-xxx-xxxx
Ext:56-1107
Ahmed.khamis@v...
Message #2 by braxis@b... on Fri, 26 Jul 2002 10:52:40 +0100 (BST)
|
|
Ahmed
Here's how to totally secure a database. Add the following code to your database and run the SecureDatabase function.
WARNING!!! Do not run this on the development copy of your database, as YOU will not be able to edit anything either!
Public Function SecureDatabase()
ChangePropertyDdl"AllowBypassKey",dbBoolean, False
ChangePropertyDdl"AllowBreakIntoCode",dbBoolean, False ChangePropertyDdl"StartupShowDBWindow",dbBoolean, False
ChangePropertyDdl"StartupShowStatusBar",dbBoolean, True ChangePropertyDdl"AllowBuiltinToolbars",dbBoolean, False
ChangePropertyDdl"AllowShortcutMenus",dbBoolean, False ChangePropertyDdl"AllowBuiltInToolbars",dbBoolean, False
ChangePropertyDdl"AllowFullMenus",dbBoolean, False ChangePropertyDdl"AllowToolbarChanges",dbBoolean, False
ChangePropertyDdl"AllowSpecialKeys",dbBoolean, False
End Sub
' *********** Code Start ***********
Function ChangePropertyDdl(stPropName As String, _
PropType As DAO.DataTypeEnum, vPropVal As Variant) _
As Boolean
' Uses the DDL argument to create a property
' that only Admins can change.
'
' Current CreateProperty listing in Access help
' is flawed in that anyone who can open the db
' can reset properties, such as AllowBypassKey
'
On Error GoTo ChangePropertyDdl_Err
Dim db As DAO.Database
Dim prp As DAO.Property
Const conPropNotFoundError = 3270
Set db = CurrentDb
' Assuming the current property was created without
' using the DDL argument. Delete it so we can
' recreate it properly
db.Properties.Delete stPropName
Set prp = db.CreateProperty(stPropName, _
PropType, vPropVal, True)
db.Properties.Append prp
' If we made it this far, it worked!
ChangePropertyDdl = True
ChangePropertyDdl_Exit:
Set prp = Nothing
Set db = Nothing
Exit Function
ChangePropertyDdl_Err:
If Err.Number = conPropNotFoundError Then
' We can ignore when the prop does not exist
Resume Next
End If
Resume ChangePropertyDdl_Exit
End Function
> from: Ahmed Khamis <Ahmed.Khamis@v...>
> date: Fri, 26 Jul 2002 11:14:53
> to: access@p...
> subject: Re: [access] hidding Tables
>
> Good day All;
>
> How can I prevent other users from either viewing or editing the tables of an MDE file
>
>
> Best regards,
>
> Ahmed Khamis
> Vodafone Egypt
> Customer operation
> Mob: xxx-xxx-xxxx
> Ext:56-1107
> Ahmed.khamis@v...
>
>
Message #3 by "Ahmed Khamis" <Ahmed.Khamis@v...> on Fri, 26 Jul 2002 13:10:25 +0200
|
|
Kindly could you please clarify more how can I add it and in which place
exactly in the data base.
Best regards,
Ahmed Khamis
Vodafone Egypt
Customer operation
Mob: xxx-xxx-xxxx
Ext:56-1107
Ahmed.khamis@v...
-----Original Message-----
From: braxis@b... [mailto:braxis@b...]
Sent: Friday, July 26, 2002 11:53 AM
To: Access
Subject: [access] Re: hidding Tables
Ahmed
Here's how to totally secure a database. Add the following code to your
database and run the SecureDatabase function.
WARNING!!! Do not run this on the development copy of your database, as
YOU will not be able to edit anything either!
Public Function SecureDatabase()
ChangePropertyDdl"AllowBypassKey",dbBoolean, False
ChangePropertyDdl"AllowBreakIntoCode",dbBoolean, False
ChangePropertyDdl"StartupShowDBWindow",dbBoolean, False
ChangePropertyDdl"StartupShowStatusBar",dbBoolean, True
ChangePropertyDdl"AllowBuiltinToolbars",dbBoolean, False
ChangePropertyDdl"AllowShortcutMenus",dbBoolean, False
ChangePropertyDdl"AllowBuiltInToolbars",dbBoolean, False
ChangePropertyDdl"AllowFullMenus",dbBoolean, False
ChangePropertyDdl"AllowToolbarChanges",dbBoolean, False
ChangePropertyDdl"AllowSpecialKeys",dbBoolean, False
End Sub
' *********** Code Start ***********
Function ChangePropertyDdl(stPropName As String, _
PropType As DAO.DataTypeEnum, vPropVal As Variant) _
As Boolean
' Uses the DDL argument to create a property
' that only Admins can change.
'
' Current CreateProperty listing in Access help
' is flawed in that anyone who can open the db
' can reset properties, such as AllowBypassKey
'
On Error GoTo ChangePropertyDdl_Err
Dim db As DAO.Database
Dim prp As DAO.Property
Const conPropNotFoundError =3D 3270
Set db =3D CurrentDb
' Assuming the current property was created without
' using the DDL argument. Delete it so we can
' recreate it properly
db.Properties.Delete stPropName
Set prp =3D db.CreateProperty(stPropName, _
PropType, vPropVal, True)
db.Properties.Append prp
' If we made it this far, it worked!
ChangePropertyDdl =3D True
ChangePropertyDdl_Exit:
Set prp =3D Nothing
Set db =3D Nothing
Exit Function
ChangePropertyDdl_Err:
If Err.Number =3D conPropNotFoundError Then
' We can ignore when the prop does not exist
Resume Next
End If
Resume ChangePropertyDdl_Exit
End Function
> from: Ahmed Khamis <Ahmed.Khamis@v...>
> date: Fri, 26 Jul 2002 11:14:53
> to: access@p...
> subject: Re: [access] hidding Tables
>
> Good day All;
>
> How can I prevent other users from either viewing or
editing the tables of an MDE file
>
>
> Best regards,
>
> Ahmed Khamis
> Vodafone Egypt
> Customer operation
> Mob: xxx-xxx-xxxx
> Ext:56-1107
> Ahmed.khamis@v...
>
>
Message #4 by braxis@b... on Fri, 26 Jul 2002 11:21:39 +0100 (BST)
|
|
Ahmed
Create a new code module and then paste both functions into the module.
To run the code, open the VBE Immediate Window, type ?SecureDatabase and press <return>.
Brian
> from: Ahmed Khamis <Ahmed.Khamis@v...>
> date: Fri, 26 Jul 2002 12:10:25
> to: access@p...
> cc: braxis@b...
> subject: Re: [access] Re: hidding Tables
>
> Kindly could you please clarify more how can I add it and in which place exactly in the data base.
>
>
> Best regards,
>
> Ahmed Khamis
> Vodafone Egypt
> Customer operation
> Mob: xxx-xxx-xxxx
> Ext:56-1107
> Ahmed.khamis@v...
>
> -----Original Message-----
> From: braxis@b... [mailto:braxis@b...]
> Sent: Friday, July 26, 2002 11:53 AM
> To: Access
> Subject: [access] Re: hidding Tables
>
> Ahmed
>
> Here's how to totally secure a database. Add the following code to your database and run the SecureDatabase function.
>
> WARNING!!! Do not run this on the development copy of your database, as YOU will not be able to edit anything either!
>
> Public Function SecureDatabase()
>
> ChangePropertyDdl"AllowBypassKey",dbBoolean, False
> ChangePropertyDdl"AllowBreakIntoCode",dbBoolean, False ChangePropertyDdl"StartupShowDBWindow",dbBoolean, False
> ChangePropertyDdl"StartupShowStatusBar",dbBoolean, True ChangePropertyDdl"AllowBuiltinToolbars",dbBoolean, False
> ChangePropertyDdl"AllowShortcutMenus",dbBoolean, False ChangePropertyDdl"AllowBuiltInToolbars",dbBoolean, False
> ChangePropertyDdl"AllowFullMenus",dbBoolean, False ChangePropertyDdl"AllowToolbarChanges",dbBoolean, False
> ChangePropertyDdl"AllowSpecialKeys",dbBoolean, False
>
> End Sub
>
> ' *********** Code Start ***********
> Function ChangePropertyDdl(stPropName As String, _
> PropType As DAO.DataTypeEnum, vPropVal As Variant) _
> As Boolean
> ' Uses the DDL argument to create a property
> ' that only Admins can change.
> '
> ' Current CreateProperty listing in Access help
> ' is flawed in that anyone who can open the db
> ' can reset properties, such as AllowBypassKey
> '
> On Error GoTo ChangePropertyDdl_Err
>
> Dim db As DAO.Database
> Dim prp As DAO.Property
>
> Const conPropNotFoundError = 3270
>
> Set db = CurrentDb
> ' Assuming the current property was created without
> ' using the DDL argument. Delete it so we can
> ' recreate it properly
> db.Properties.Delete stPropName
> Set prp = db.CreateProperty(stPropName, _
> PropType, vPropVal, True)
> db.Properties.Append prp
>
> ' If we made it this far, it worked!
> ChangePropertyDdl = True
>
> ChangePropertyDdl_Exit:
> Set prp = Nothing
> Set db = Nothing
> Exit Function
>
> ChangePropertyDdl_Err:
> If Err.Number = conPropNotFoundError Then
> ' We can ignore when the prop does not exist
> Resume Next
> End If
> Resume ChangePropertyDdl_Exit
> End Function
>
>
> > from: Ahmed Khamis <Ahmed.Khamis@v...>
> > date: Fri, 26 Jul 2002 11:14:53
> > to: access@p...
> > subject: Re: [access] hidding Tables
> >
> > Good day All;
> >
> > How can I prevent other users from either viewing or editing the tables of an MDE file
> >
> >
> > Best regards,
> >
> > Ahmed Khamis
> > Vodafone Egypt
> > Customer operation
> > Mob: xxx-xxx-xxxx
> > Ext:56-1107
> > Ahmed.khamis@v...
> >
> >
>
>
>
Message #5 by "Ahmed Khamis" <Ahmed.Khamis@v...> on Fri, 26 Jul 2002 14:04:03 +0200
|
|
Thanks for your help
Best regards,
Ahmed Khamis
Vodafone Egypt
Customer operation
Mob: xxx-xxx-xxxx
Ext:56-1107
Ahmed.khamis@v...
-----Original Message-----
From: braxis@b... [mailto:braxis@b...]
Sent: Friday, July 26, 2002 12:22 PM
To: Access
Subject: [access] Re: hidding Tables
Ahmed
Create a new code module and then paste both functions into the module.
To run the code, open the VBE Immediate Window, type ?SecureDatabase and
press <return>.
Brian
> from: Ahmed Khamis <Ahmed.Khamis@v...>
> date: Fri, 26 Jul 2002 12:10:25
> to: access@p...
> cc: braxis@b...
> subject: Re: [access] Re: hidding Tables
>
> Kindly could you please clarify more how can I add it and in which
place exactly in the data base.
>
>
> Best regards,
>
> Ahmed Khamis
> Vodafone Egypt
> Customer operation
> Mob: xxx-xxx-xxxx
> Ext:56-1107
> Ahmed.khamis@v...
>
> -----Original Message-----
> From: braxis@b... [mailto:braxis@b...]
> Sent: Friday, July 26, 2002 11:53 AM
> To: Access
> Subject: [access] Re: hidding Tables
>
> Ahmed
>
> Here's how to totally secure a database. Add the following code to
your database and run the SecureDatabase function.
>
> WARNING!!! Do not run this on the development copy of your database,
as YOU will not be able to edit anything either!
>
> Public Function SecureDatabase()
>
> ChangePropertyDdl"AllowBypassKey",dbBoolean, False
> ChangePropertyDdl"AllowBreakIntoCode",dbBoolean, False
ChangePropertyDdl"StartupShowDBWindow",dbBoolean, False
> ChangePropertyDdl"StartupShowStatusBar",dbBoolean, True
ChangePropertyDdl"AllowBuiltinToolbars",dbBoolean, False
> ChangePropertyDdl"AllowShortcutMenus",dbBoolean, False
ChangePropertyDdl"AllowBuiltInToolbars",dbBoolean, False
> ChangePropertyDdl"AllowFullMenus",dbBoolean, False
ChangePropertyDdl"AllowToolbarChanges",dbBoolean, False
> ChangePropertyDdl"AllowSpecialKeys",dbBoolean, False
>
> End Sub
>
> ' *********** Code Start ***********
> Function ChangePropertyDdl(stPropName As String, _
> PropType As DAO.DataTypeEnum, vPropVal As Variant) _
> As Boolean
> ' Uses the DDL argument to create a property
> ' that only Admins can change.
> '
> ' Current CreateProperty listing in Access help
> ' is flawed in that anyone who can open the db
> ' can reset properties, such as AllowBypassKey
> '
> On Error GoTo ChangePropertyDdl_Err
>
> Dim db As DAO.Database
> Dim prp As DAO.Property
>
> Const conPropNotFoundError =3D 3270
>
> Set db =3D CurrentDb
> ' Assuming the current property was created without
> ' using the DDL argument. Delete it so we can
> ' recreate it properly
> db.Properties.Delete stPropName
> Set prp =3D db.CreateProperty(stPropName, _
> PropType, vPropVal, True)
> db.Properties.Append prp
>
> ' If we made it this far, it worked!
> ChangePropertyDdl =3D True
>
> ChangePropertyDdl_Exit:
> Set prp =3D Nothing
> Set db =3D Nothing
> Exit Function
>
> ChangePropertyDdl_Err:
> If Err.Number =3D conPropNotFoundError Then
> ' We can ignore when the prop does not exist
> Resume Next
> End If
> Resume ChangePropertyDdl_Exit
> End Function
>
>
> > from: Ahmed Khamis <Ahmed.Khamis@v...>
> > date: Fri, 26 Jul 2002 11:14:53
> > to: access@p...
> > subject: Re: [access] hidding Tables
> >
> > Good day All;
> >
> > How can I prevent other users from either viewing or
editing the tables of an MDE file
> >
> >
> > Best regards,
> >
> > Ahmed Khamis
> > Vodafone Egypt
> > Customer operation
> > Mob: xxx-xxx-xxxx
> > Ext:56-1107
> > Ahmed.khamis@v...
> >
> >
>
>
>
|
|
 |