|
 |
access thread: R: Re: R: Re: hidding Tables
Message #1 by Bohus Peter <peter.bohus@l...> on Wed, 31 Jul 2002 09:47:53 +0200
|
|
Brian,
Thanks for your comment. It is very clear since it gives full
explanation
what and how "property" is being changed using SecureDatabase public
function.
According to your previous suggestion I have copied both functions
(SecureDatabase, ChangePropertyDdl) into new module of a back-end mdb
(before contained only tables to be linked) and then I have launched
?SecureDatabase in immediate window. Doing it under Access 97 special
error
message comes as "Visual Basic cannot recognise automatism", while
working
in Access2000
I met compile error (Type Mismatch).
I don't know what is wrong.
Best regards
Peter
> -----Messaggio originale-----
> Da: braxis@b... [SMTP:braxis@b...]
> Inviato: venerd=EC 26 luglio 2002 14.54
> A: Access
> Oggetto: [access] Re: R: Re: hidding Tables
>
> Peter
>
> This code prevents the user from ever seeing the database - all they
have
> access to is the forms and reports the designer has provided for
them.
>
> Here is how the various parts work:
>
> AllowBypassKey - Prevents the user from holding the <shift> key down
when
> stating the database to overide the startup options/autoexec macro
>
> StartupShowDBWindow - Prevents the user from seeing the database
window.
> Therefore they have no access to tables, quries, etc.
>
> AllowBreakIntoCode - Prevents the user from pressing <ctrl><break>
and
> getting into the VBE if a code error occours
>
> AllowBuiltinToolbars - Tells Access not to display the built-in
default
> toolbar for a form. Only the toolbar specified by the designer will
be
> displayed. Prevents the user from switching to design view, or
unhiding
> the database window.
>
> AllowShortcutMenus - Does the same as above for the default
right-click
> menus.
>
> AllowFullMenus - Not sure about this one! Need to go back to my
source.
>
> AllowToolbarChanges - Prevents the user from designing their own
toolbar
> which would give them back the functionality you have just denied
them.
>
> AllowSpecialKeys - Prevents the standard Access short cut keys from
> working, such as <alt><F11> to open the VBE.
>
> Of course, if you haven't implemented Access security, and restricted
> admin access to the database, the above won't prevent your database
being
> altered, using code, from a second database!
>
>
> > from: Bohus Peter <peter.bohus@l...>
> > date: Fri, 26 Jul 2002 12:57:06
> > to: access@p...
> > subject: Re: [access] R: Re: hidding Tables
> >
> > Hello Brian,
> >
> > Can you tell me why it is not possible (or how it is possible ) to
> write
> > functions in order to see such hidden tables which were made ,
for
> example
> > according to your functions.
> >
> >
> > Best regards, ciao
> >
> > Peter
> > > -----Messaggio originale-----
> > > Da: braxis@b... [SMTP:braxis@b...]
> > > Inviato: venerd=EC 26 luglio 2002 12.22
> > > A: Access
> > > Oggetto: [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...
> > > > >
> > > > >
> > > > > ---
> > > > > Change your mail options at http://p2p.wrox.com/manager.asp
or
> > > >
> > > >
> > > >
> > >
> > >
> >
>
>
Message #2 by Bohus Peter <peter.bohus@l...> on Wed, 31 Jul 2002 09:55:02 +0200
|
|
Dear Chris,
Regarding your comments I would like to ask more details. As beginner in
programming I need unusual more clarification. I intend to try out your
solution and for this purpose it would be very useful if you could send a
copy of your login form using simple mdb containing only this required form.
(By the way: I prefer to use Access 97)
I could see you apply ChangeProperty function. I suppose this function is
same function which declared by Brian (Braxis) some days ago
(ChangePropertyDdl). But if it is different please let me know it. Finally
I would like to know what difference is between DB_Boolean and dbBoolean
declarations as data types.
Many thanks in advance
Best regards
Peter
> -----Messaggio originale-----
> Da: Chris Seier [SMTP:chrisseier@c...]
> Inviato: sabato 27 luglio 2002 0.49
> A: Access
> Oggetto: [access] Re: R: Re: hidding Tables
>
> I'm doing something similar using a custom security module...not the
> Access
> security module.
>
> I use a Developer Toolbar to open the Startup and Customize menus. I sign
> in
> as the developer and then exit and come back in holding the shift key. To
> reset the locks, sign in as a user other than developer, exit and come
> back
> in as a user other than developer.
>
> May not be as nice as the Access security module but, I don't have any
> experience with that and this DB if for my wife to use at work and she
> won't
> want to mess with setting up users etc...
>
> See the code below.
>
> Hope it helps.
>
> Chris
>
>
>
> Here's how I do it behind my Login form:
> Private Sub Form_Open(Cancel As Integer)
> Const DB_Text As Long = 10
> Const DB_Boolean As Long = 1
> ChangeProperty "StartupShowDBWindow", DB_Boolean, False
> ChangeProperty "StartupShowStatusBar", DB_Boolean, True
> ChangeProperty "AllowBuiltinToolbars", DB_Boolean, False
> ChangeProperty "AllowFullMenus", DB_Boolean, False
> ChangeProperty "AllowBreakIntoCode", DB_Boolean, False
> ChangeProperty "AllowSpecialKeys", DB_Boolean, False
> ChangeProperty "AllowBypassKey", DB_Boolean, False
> ChangeProperty "AllowShortcutMenus", DB_Boolean, False
> DoCmd.ShowToolbar "Developer", acToolbarNo
> DoCmd.ShowToolbar "Administrator Tools", acToolbarNo
> DoCmd.Maximize
> End Sub
>
> Private Sub Password_AfterUpdate()
> Select Case Me.Password
> Case "Communications Manage Password" 'Sign in as Communications
> Manager
> DoCmd.OpenForm "frmDetectIdleTime", acNormal, , , , acHidden
> DoCmd.OpenForm "frmMain Menu", acNormal
> Forms![frmMain Menu]![cmdImport Data].Visible = False
> Forms![frmMain Menu]![cmdAdministration].Visible = False
> Forms![frmMain Menu]![UserMode] = "Communications Manager"
> Case "Wan Admin Password" 'Sign in as Wan Administrator
> DoCmd.ShowToolbar "Administrator Tools", acToolbarYes
> DoCmd.OpenForm "frmDetectIdleTime", acNormal, , , , acHidden
> DoCmd.OpenForm "frmMain Menu", acNormal
> Forms![frmMain Menu]![UserMode] = "Wan Administrator"
> Case "Developer Password" 'Sign in as Developer
> Const DB_Text As Long = 10
> Const DB_Boolean As Long = 1
> ChangeProperty "StartupShowDBWindow", DB_Boolean, True
> ChangeProperty "StartupShowStatusBar", DB_Boolean, True
> ChangeProperty "AllowBuiltinToolbars", DB_Boolean, True
> ChangeProperty "AllowFullMenus", DB_Boolean, True
> ChangeProperty "AllowBreakIntoCode", DB_Boolean, True
> ChangeProperty "AllowSpecialKeys", DB_Boolean, True
> ChangeProperty "AllowBypassKey", DB_Boolean, True
> ChangeProperty "AllowShortcutMenus", DB_Boolean, True
> DoCmd.ShowToolbar "Developer", acToolbarYes
> DoCmd.SelectObject acForm, "frmMain Menu", True
> DoCmd.Close acForm, "frmLogin", acSaveNo
> Case Else 'Wrong Password. Try again or kick user out.
> Me.Password = Null
> If vbYes = MsgBox("Wrong Password." & _
> vbCrLf & _
> "Exit Database?", _
> vbYesNo + vbCritical) Then
> DoCmd.Quit
> End If
> End Select
>
> > -----Original Message-----
> > From: braxis@b... [mailto:braxis@b...]
> > Sent: Friday, July 26, 2002 8:54 AM
> > To: Access
> > Subject: [access] Re: R: Re: hidding Tables
> >
> >
> > Peter
> >
> > This code prevents the user from ever seeing the database - all
> > they have access to is the forms and reports the designer has
> > provided for them.
> >
> > Here is how the various parts work:
> >
> > AllowBypassKey - Prevents the user from holding the <shift> key
> > down when stating the database to overide the startup
> > options/autoexec macro
> >
> > StartupShowDBWindow - Prevents the user from seeing the database
> > window. Therefore they have no access to tables, quries, etc.
> >
> > AllowBreakIntoCode - Prevents the user from pressing
> > <ctrl><break> and getting into the VBE if a code error occours
> >
> > AllowBuiltinToolbars - Tells Access not to display the built-in
> > default toolbar for a form. Only the toolbar specified by the
> > designer will be displayed. Prevents the user from switching to
> > design view, or unhiding the database window.
> >
> > AllowShortcutMenus - Does the same as above for the default
> > right-click menus.
> >
> > AllowFullMenus - Not sure about this one! Need to go back to my source.
> >
> > AllowToolbarChanges - Prevents the user from designing their own
> > toolbar which would give them back the functionality you have
> > just denied them.
> >
> > AllowSpecialKeys - Prevents the standard Access short cut keys
> > from working, such as <alt><F11> to open the VBE.
> >
> > Of course, if you haven't implemented Access security, and
> > restricted admin access to the database, the above won't prevent
> > your database being altered, using code, from a second database!
> >
> >
> > > from: Bohus Peter <peter.bohus@l...>
> > > date: Fri, 26 Jul 2002 12:57:06
> > > to: access@p...
> > > subject: Re: [access] R: Re: hidding Tables
> > >
> > > Hello Brian,
> > >
> > > Can you tell me why it is not possible (or how it is possible
> > ) to write
> > > functions in order to see such hidden tables which were made
> > , for example
> > > according to your functions.
> > >
> > >
> > > Best regards, ciao
> > >
> > > Peter
> > > > -----Messaggio originale-----
> > > > Da: braxis@b... [SMTP:braxis@b...]
> > > > Inviato: venerd́ 26 luglio 2002 12.22
> > > > A: Access
> > > > Oggetto: [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 = 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 braxis@b... on Wed, 31 Jul 2002 10:38:28 +0100 (BST)
|
|
Sorry Peter
A couple of small errors that prevented the code from working in Access 97:
In the function ChangePropertyDdl change the following:
Function ChangePropertyDdl(stPropName As String, _
PropType As DAO.DataTypeEnum, vPropVal As Variant) _
As Boolean
to
Function ChangePropertyDdl(stPropName As String, _
PropType As Variant, _
vPropVal As Variant) As Boolean
Const conPropNotFoundError = 3270
to
Const conPropNotFoundError = 3265
Brian
> from: Bohus Peter <peter.bohus@l...>
> date: Wed, 31 Jul 2002 08:47:53
> to: access@p...
> subject: Re: [access] R: Re: R: Re: hidding Tables
>
> Brian,
>
> Thanks for your comment. It is very clear since it gives full explanation
> what and how "property" is being changed using SecureDatabase public
> function.
> According to your previous suggestion I have copied both functions
> (SecureDatabase, ChangePropertyDdl) into new module of a back-end mdb
> (before contained only tables to be linked) and then I have launched
> ?SecureDatabase in immediate window. Doing it under Access 97 special error
> message comes as "Visual Basic cannot recognise automatism", while working
> in Access2000
> I met compile error (Type Mismatch).
> I don't know what is wrong.
>
> Best regards
>
> Peter
>
>
Message #4 by braxis@b... on Wed, 31 Jul 2002 10:51:55 +0100 (BST)
|
|
And even more apologies Peter. Access 2000 has caught me out with some slop
py coding!
ChangePropertyDdl is a FUNCTION, so should be called like this:
Public Function SecureDatabase()
Dim bolResult As Boolean
bolResult =3D ChangePropertyDdl("AllowBypassKey", dbBoolean, False)
bolResult =3D ChangePropertyDdl("AllowBreakIntoCode", dbBoolean, False)
bolResult =3D ChangePropertyDdl("StartupShowDBWindow", dbBoolean, False
)
bolResult =3D ChangePropertyDdl("StartupShowStatusBar", dbBoolean, True
)
bolResult =3D ChangePropertyDdl("AllowBuiltinToolbars", dbBoolean, Fals
e)
bolResult =3D ChangePropertyDdl("AllowShortcutMenus", dbBoolean, False)
bolResult =3D ChangePropertyDdl("AllowBuiltInToolbars", dbBoolean, Fals
e)
bolResult =3D ChangePropertyDdl("AllowFullMenus", dbBoolean, False)
bolResult =3D ChangePropertyDdl("AllowToolbarChanges", dbBoolean, False
)
bolResult =3D ChangePropertyDdl("AllowSpecialKeys", dbBoolean, False)
End Function
Brian
P.S. Don't forget to make a reference to the Microsoft DAO x.x Object Libra
ry too.
> from: Bohus Peter <peter.bohus@l...>
> date: Wed, 31 Jul 2002 08:47:53
> to: access@p...
> subject: Re: [access] R: Re: R: Re: hidding Tables
>
> Brian,
>
> Thanks for your comment. It is very clear since it gives full explanatio
n
> what and how "property" is being changed using SecureDatabase public
> function.
> According to your previous suggestion I have copied both functions
> (SecureDatabase, ChangePropertyDdl) into new module of a back-end mdb
> (before contained only tables to be linked) and then I have launched
> ?SecureDatabase in immediate window. Doing it under Access 97 special er
ror
> message comes as "Visual Basic cannot recognise automatism", while worki
ng
> in Access2000
> I met compile error (Type Mismatch).
> I don't know what is wrong.
>
> Best regards
>
> Peter
>
>
> > -----Messaggio originale-----
> > Da:=09braxis@b... [SMTP:braxis@b...]
> > Inviato:=09venerd=EC 26 luglio 2002 14.54
> > A:=09Access
> > Oggetto:=09[access] Re: R: Re: hidding Tables
> >
> > Peter
> >
> > This code prevents the user from ever seeing the database - all they ha
ve
> > access to is the forms and reports the designer has provided for them.
> >
> > Here is how the various parts work:
> >
> > AllowBypassKey - Prevents the user from holding the <shift> key down wh
en
> > stating the database to overide the startup options/autoexec macro
> >
> > StartupShowDBWindow - Prevents the user from seeing the database window
.
> > Therefore they have no access to tables, quries, etc.
> >
> > AllowBreakIntoCode - Prevents the user from pressing <ctrl><break> and
> > getting into the VBE if a code error occours
> >
> > AllowBuiltinToolbars - Tells Access not to display the built-in default
> > toolbar for a form. Only the toolbar specified by the designer will be
> > displayed. Prevents the user from switching to design view, or unhiding
> > the database window.
> >
> > AllowShortcutMenus - Does the same as above for the default right-click
> > menus.
> >
> > AllowFullMenus - Not sure about this one! Need to go back to my source.
> >
> > AllowToolbarChanges - Prevents the user from designing their own toolba
r
> > which would give them back the functionality you have just denied them.
> >
> > AllowSpecialKeys - Prevents the standard Access short cut keys from
> > working, such as <alt><F11> to open the VBE.
> >
> > Of course, if you haven't implemented Access security, and restricted
> > admin access to the database, the above won't prevent your database bei
ng
> > altered, using code, from a second database!
> >
> >
> > > from: Bohus Peter <peter.bohus@l...>
> > > date: Fri, 26 Jul 2002 12:57:06
> > > to: access@p...
> > > subject: Re: [access] R: Re: hidding Tables
> > >
> > > Hello Brian,
> > >
> > > Can you tell me why it is not possible (or how it is possible ) to
> > write
> > > functions in order to see such hidden tables which were made , for
> > example
> > > according to your functions.
> > >
> > >
> > > Best regards, ciao
> > >
> > > Peter
> > > > -----Messaggio originale-----
> > > > Da:=09braxis@b... [SMTP:braxis@b...]
> > > > Inviato:=09venerd=EC 26 luglio 2002 12.22
> > > > A:=09Access
> > > > Oggetto:=09[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 ?SecureDatabas
e
> > 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 whic
h
> > 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 t
o
> > your
> > > > database and run the SecureDatabase function.
> > > > >
> > > > > WARNING!!! Do not run this on the development copy of your databa
se,
> > 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...
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>
|
|
 |