Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hide the database window permanently

15 views
Skip to first unread message

Naushad

unread,
Mar 12, 2008, 12:38:19 AM3/12/08
to
Hi all,

I have designed a database and split it into Front End(FE) and Back
End(BE). I have created the .mde file for the FE users. In the .mde
file FE Users can't do any thing in form, report and module but they
can play with the table and query. Some FE users can open the .mde
file with shift key and go into the database window. I don't want that
FE users see the database window.

Is there any way to hide the database window permanently with the FE
users?

Thanks in advance.

Naushad

Arno R

unread,
Mar 12, 2008, 5:43:36 AM3/12/08
to

"Naushad" <nha...@kockw.com> schreef in bericht news:2c46ea09-4442-4b9c...@e39g2000hsf.googlegroups.com...

Set the following options:
--Not show the Database window
--Set AllowSpecialKeys to No

This will keep the 'normal' user out.
BUT you might also lock yourself out... (make a backup first, just in case)

Google this group for ShiftKey and AllowByPassKey

Arno R

paii, Ron

unread,
Mar 12, 2008, 8:30:14 AM3/12/08
to

"Naushad" <nha...@kockw.com> wrote in message
news:2c46ea09-4442-4b9c...@e39g2000hsf.googlegroups.com...

The following code will do a good job of locking up your database. Run it on
a copy of your db because it will lock you out also.Otherwise put in a
backdoor to run code that will undo this. Some of the changes will not be in
affect until you close and reopen the mdb.Note: if someone really wants in,
they will find a way.

' Lockup the MDB
ChangeProperty "AllowBypassKey", dbBoolean, False
ChangeProperty "StartupShowDBWindow", dbBoolean, False
ChangeProperty "AllowBuiltinToolbars", dbBoolean, False
ChangeProperty "AllowToolbarChanges", dbBoolean, True
ChangeProperty "AllowFullMenus", dbBoolean, False
Application.ShortcutMenuBar = "CustomShortCut" '
This is a custom menu to replace the builtin shortcut
ChangeProperty "AllowShortcutMenus", dbBoolean, True
ChangeProperty "AllowBreakIntoCode", dbBoolean, False
ChangeProperty "AllowSpecialKeys", dbBoolean, False
ChangeProperty "AllowBypassKey", dbBoolean, False
DoCmd.ShowToolbar "Form View", acToolbarNo
DoCmd.ShowToolbar "CustomForm", acToolbarNo
DoCmd.ShowToolbar "CustomForm"
' This is a custome menubar to replace builtin
DoCmd.ShowToolbar "Table DataSheet", acToolbarNo

' Unlock the MDB

ChangeProperty "AllowBypassKey", dbBoolean, True
ChangeProperty "AllowBuiltinToolbars", dbBoolean, True
ChangeProperty "AllowToolbarChanges", dbBoolean, True
ChangeProperty "AllowFullMenus", dbBoolean, True
Application.ShortcutMenuBar = ""
ChangeProperty "AllowShortcutMenus", dbBoolean, True
ChangeProperty "AllowBreakIntoCode", dbBoolean, True
ChangeProperty "AllowSpecialKeys", dbBoolean, True
ChangeProperty "AllowBypassKey", dbBoolean, True
DoCmd.ShowToolbar "Form View", acToolbarWhereApprop
DoCmd.ShowToolbar "CustomForm", acToolbarNo ' This is
a custom menubar to replace builtin
DoCmd.ShowToolbar "Table DataSheet", acToolbarWhereApprop


Naushad

unread,
Mar 13, 2008, 1:07:51 AM3/13/08
to
On Mar 12, 3:30 pm, "paii, Ron" <n...@no.com> wrote:
> "Naushad" <nhai...@kockw.com> wrote in message


Thanks for your valuable support but I couldn't understand "Put in the
back door to run code. Can you explain the same.

paii, Ron

unread,
Mar 13, 2008, 8:00:38 AM3/13/08
to

"Naushad" <nha...@kockw.com> wrote in message
news:5a14d7c5-18fa-42d2...@m44g2000hsc.googlegroups.com...

On Mar 12, 3:30 pm, "paii, Ron" <n...@no.com> wrote:
> "Naushad" <nhai...@kockw.com> wrote in message
>
> news:2c46ea09-4442-4b9c...@e39g2000hsf.googlegroups.com...
>
> > Hi all,
>
> > I have designed a database and split it into Front End(FE) and Back
> > End(BE). I have created the .mde file for the FE users. In the .mde
> > file FE Users can't do any thing in form, report and module but they
> > can play with the table and query. Some FE users can open the .mde
> > file with shift key and go into the database window. I don't want that
> > FE users see the database window.
>
> > Is there any way to hide the database window permanently with the FE
> > users?
>
> > Thanks in advance.
>
> > Naushad
>
> The following code will do a good job of locking up your database. Run it
on
> a copy of your db because it will lock you out also.Otherwise put in a
> backdoor to run code that will undo this. Some of the changes will not be
in
> affect until you close and reopen the mdb.Note: if someone really wants
in,
> they will find a way.
>

Thanks for your valuable support but I couldn't understand "Put in the


back door to run code. Can you explain the same.

The lock code will make it very difficult to get to the database window,
even alt-shift will not work. So you should only allow it to run on the copy
of the front-end distributed to your users. A back door is some undocumented
control or combination of controls on that front-end, not known to your user
that will run the unlock code.


Naushad

unread,
Mar 24, 2008, 1:44:17 AM3/24/08
to
> that will run the unlock code.- Hide quoted text -
>
> - Show quoted text -

Hi

When I compile your code in my database the error "Sub or Function not
defined" is shown. I think we have to define the ChangeProperty
function. So please help me to solve this problem.

Naushad

Arch

unread,
Mar 24, 2008, 8:01:45 AM3/24/08
to
On Sun, 23 Mar 2008 22:44:17 -0700 (PDT), Naushad <nha...@kockw.com>
wrote:

That function is documented here:
http://www.mvps.org/access/general/gen0040.htm

Cheers,
Arch

paii, Ron

unread,
Mar 24, 2008, 8:30:49 AM3/24/08
to

"Naushad" <nha...@kockw.com> wrote in message
news:02f41241-6593-4e13...@k13g2000hse.googlegroups.com...

Hi

Naushad


Here is the function I am using

'---------------------------------
' Change the selected property
'
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


0 new messages