Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

Re: Split DB BE question

Tip: Looking for answers? Try searching our database.



You are accessing this site in a read-only mode. For full access to all member benefits, including message posting, please login or register. Registration is completely free, simple, and takes only a few seconds.

Login | Free AccessMonster.com registration | Whole discussion thread

The message you are replying to and its parents are listed in the reverse order with the most recent posts first. This might not be the whole discussion thread. To read all the messages in this thread please click here.

Re: Split DB BE question

Joan Wild26 Apr 2006 16:13
First you should realize that the code you have will only affect the mdb the
next time it is opened.

In a separate mdb, create a new module and put the following in it
Public Function setback()
Dim db As Database
Dim prop As Property, wrk As Workspace
Set wrk = DBEngine.Workspaces(0)
Set db = wrk.OpenDatabase("path to mdb that has shiftkey disabled")
On Error Resume Next
db.Properties.Delete "allowbypasskey"
Set prop = db.CreateProperty("allowbypasskey", dbBoolean, True)
db.Properties.Append prop
db.Properties("allowbypasskey") = True
Set prop = Nothing
Set db = Nothing
Set wrk = Nothing
End Function

Save the module with some name other than setback.

You can then just run the function from the immediate window.

Signature

Joan Wild
Microsoft Access MVP

>> You can re-enable it from another mdb.  Just change your code to
>> refer to the mdb with the shiftkey disabled, instead of CurrentDb().
[quoted text clipped - 21 lines]
>    End If
> End Sub

Mary M26 Apr 2006 14:14
> You can re-enable it from another mdb.  Just change your code to refer to
> the mdb with the shiftkey disabled, instead of CurrentDb().  Post the code
> you're using if you don't understand what I mean.

I don't know what you mean about using another mdb. Here is the code for the
FE

Private Sub Form_Open(Cancel As Integer)
   DisableBypass
End Sub

Sub DisableBypass()

   Dim prp As Property

   On Error Resume Next
   CurrentDb.Properties("AllowBypassKey") = False
   If Err Then
       Err.Clear
       Set prp = CurrentDb.CreateProperty("AllowBypassKey", dbBoolean,
False)
       CurrentDb.Properties.Append prp
       Set prp = Nothing
   End If
End Sub

Joan Wild26 Apr 2006 13:48
You can re-enable it from another mdb.  Just change your code to refer to
the mdb with the shiftkey disabled, instead of CurrentDb().  Post the code
you're using if you don't understand what I mean.

You could also just use Albert Kallal's utility.  It allows you to
disable/enable the shiftkey on any database.  Look for By Pass Shift Key
Code on this page
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Signature

Joan Wild
Microsoft Access MVP

>> You could set an autoexec macro in the backend that pops up a message
>> saying "Access the data via the frontend", and follow that with the
[quoted text clipped - 6 lines]
> suggestions? The FE already has the shift bypass disabled, so I keep
> a copy of the FE w/o the bypass code so I can make edits.

Mary M26 Apr 2006 12:51
> You could set an autoexec macro in the backend that pops up a message
> saying "Access the data via the frontend", and follow that with the Quit
> Action.
>
> You can then disable the shiftkey bypass on the backend.

Thanks, I thought of that but I couldn't figure out how to get into the
backend for modifications if the shift bypass was disabled. Any suggestions?
The FE already has the shift bypass disabled, so I keep a copy of the FE w/o
the bypass code so I can make edits.

Joan Wild25 Apr 2006 21:32
Yes you can.  Once you've done that open the frontend, and delete the links.
Re-create them using File, Get External Data, Link and when you locate the
backend, it'll prompt you for the password (which will get stored with the
links).

However, you should know that the database password is easily cracked.

You could set an autoexec macro in the backend that pops up a message saying
"Access the data via the frontend", and follow that with the Quit Action.

You can then disable the shiftkey bypass on the backend.

Signature

Joan Wild
Microsoft Access MVP

> If you have a DB split using a FE and a BE can you put a password on
> the BE db? Or will that cause the FE /BE not to work? Basically I
[quoted text clipped - 3 lines]
> Thanks in advance.
> .

Mary M25 Apr 2006 18:07
If you have a DB split using a FE and a BE can you put a password on the BE
db? Or will that cause the FE /BE not to work? Basically I don't want a user
to be able to open the BE db and see the tables, values ect. The FE is
already an mde application.

Thanks in advance.
.

Quick links:

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage




©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.