Encrypted BE and now FE won't open (1 Viewer)

constableparks

Registered User.
Local time
Today, 13:21
Joined
Jul 6, 2017
Messages
53
:banghead:

I must be doing something wrong...but I've followed several different tutorials and still can't get this to work.

My steps (in Access 2016):
1. Split database into BE/FE. BE is now on a network shared drive . FE is local drive.
2. Opened each one (individually) just to make sure they both open properly. They did. Everything looks like the split was successful.
3. Closed both BE and FE.
4. Opened BE in Exclusive mode. (network drive)
5. Encrypted BE using a password.
6. Closed BE
7. Opened BE and confirmed that the password was required.
8. Closed BE.
9. Opened FE (which is still located on the local drive)- but it will not open. It just goes to the Open screen with recent options. I tried to browse and open, but nothing. The database does not open.

Just for kicks, I tried this all on my local drive (FE and BE on my local drive) in case the network was causing any issues but I got the same results.

At that point I think I screamed. I gnashed my teeth, poured ashes on my head, and rent my cloak asunder. What am I doing wrong?

:banghead:
 

isladogs

MVP / VIP
Local time
Today, 18:21
Joined
Jan 14, 2017
Messages
18,186
First of all, you haven't encrypted your BE, you've password protected it.

Secondly you need to relink the tables to your BE.
When you do so, you will be prompted to enter the password.

After that, all should be hunky dory

EDIT:
As you can't open the FE normally at the moment, hold the shift key down whilst you open the FE
This will bypass the startup conditions

If you have disabled the use of the shift bypass then I'm afraid you're stuffed.
BUT of course you did keep a backup of the BE without a password didn't you ....
 

constableparks

Registered User.
Local time
Today, 13:21
Joined
Jul 6, 2017
Messages
53
Granted - I did not "encrypt" the BE - I password protected it.

Yep - disabled the shift key. I'll undo that and retry. I'm actually doing my testing on a copy version of the database (including the split) - so I have messed up a half dozen versions of the database and deleted/re-created without touching the main one. I have to know 100% what I am doing before I touch the main database.

Thanks Colin.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 18:21
Joined
Feb 19, 2013
Messages
16,553
If you have disabled the use of the shift bypass then I'm afraid you're stuffed.
there is an easy way round it using VBA

in another db create code which opens another db, then change the property. Can't remember without checking but something like

dim db as dao.database
set db=application.opendatabase "C:\....\mydb.accdb"
set db.properties("DisableByPassKey")=false
db.close
set db=nothing
 

isladogs

MVP / VIP
Local time
Today, 18:21
Joined
Jan 14, 2017
Messages
18,186
In fact all you need to do is create a new clean database & import all objects from the original database to the new one.

I was keeping that solution back for later ....:)
If I was unscrupulous, I could then have charged a fortune for unlocking the database with my highly technical specialised skills
BUT no chance now! :D
 

CJ_London

Super Moderator
Staff member
Local time
Today, 18:21
Joined
Feb 19, 2013
Messages
16,553
I am unscrupulous for those who don't use this forum:)
 

constableparks

Registered User.
Local time
Today, 13:21
Joined
Jul 6, 2017
Messages
53
Seems that the Shift option had nothing to do with it. After I enabled the Shift option - it still did not allow me to open the FE - even after recreating all of the steps above with the Shift option enabled and pressing shift while opening FE.

What did allow me to open it is if I did this:

1. Split database into BE and FE.
2. Open FE and delete all of the tables out of it.
3. Close FE
4. Open BE and password protect.
5. Close BE
6. Open FE and select
>New Data Source
>From Database
>Access
>Browse to the BE
>select Link to the data source by creating a linked table.
>selected all tables

Seems that the issue is cause if I don't delete out the tables in the FE before I password protect the BE. I didn't think to do any of that before because it was never mentioned in any of the tutorials that I went through and it didn't seem like it caused issues with their database. Perhaps this is a 2016 version issue? All of the tutorials that I watched were 2013 and older.

Or maybe I am still not doing something right? I enabled the shift option with the following:

On a form - checkbox called checkShift and a button Command0
Code:
Private Sub Command0_Click()
On Error GoTo Suberror

Dim prp As DAO.Property
CurrentDb.Properties("AllowBypassKey") = Me.checkShift


SubExit:
  Exit Sub
  
Suberror:
If Err.Number = 3270 Then
    
    Set prp = CurrentDb.CreateProperty("AllowBypassKey", dbBoolean, Me.checkShift)
    CurrentDb.Properties.Append prp
Else
    MsgBox Me.Name & "/Form_Load error:" & Err.Number & " -- " & Err.Description
    
End If
GoTo SubExit
    
End Sub

Private Sub Form_Load()
On Error GoTo Suberror

'Me.checkShift = CurrentDb.Properties("AllowBypassKey")
If CurrentDb.Properties("AllowBypassKey") = True Then
Me.checkShift = True
Else
Me.checkShift = False
End If

SubExit:
Exit Sub

Suberror:
If Err.Number = 3270 Then

    Me.checkShift = False
    Else
    MsgBox Me.Name & "/Form_Load error:" & Err.Number & " -- " & Err.Description
    
    End If
    GoTo SubExit
    
End Sub

Anyway - for now, I can password protect the BE as long as I remember to delete out the tables from the FE first.
 
Last edited:

constableparks

Registered User.
Local time
Today, 13:21
Joined
Jul 6, 2017
Messages
53
More information - and probably what is really at the heart of the issue:

I created a new database and tried the Split - password protect BE - open FE and everything worked without having to use the shift button. I was able to open the database, delete the tables and relink to BE tables. This convinces me that there is a property somewhere in my original database that is over-riding the AllowBypassKey property that is causing the issues in the above posts.

I may just create a new database and import the tables, queries, etc and start with a fresh set of properties. I'm not too far along in the development that it would create a burden.

Anyway - thanks everyone for your input.
 

isladogs

MVP / VIP
Local time
Today, 18:21
Joined
Jan 14, 2017
Messages
18,186
I was just going to remind you that I wrote this in post #5 when I saw your latest reply...

In fact all you need to do is create a new clean database & import all objects from the original database to the new one.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 18:21
Joined
Sep 12, 2006
Messages
15,614
note that password protecting the back end won't help if your users can see the database window in the front end.

Hovering over the linked table name will give the source database details and password in the connection string. (unless they fixed this in very recent versions)

You can also get the password in code

tabledefs("sometable").connect discloses the same connection string.
 

Mark_

Longboard on the internet
Local time
Today, 11:21
Joined
Sep 12, 2017
Messages
2,111
constableparks,
Do you have any code in your app that, on start up, tries to open any of your tables? Often this can be something as simple as "OK, open up and load configuration/location specific values".
 

constableparks

Registered User.
Local time
Today, 13:21
Joined
Jul 6, 2017
Messages
53
constableparks,
Do you have any code in your app that, on start up, tries to open any of your tables? Often this can be something as simple as "OK, open up and load configuration/location specific values".

Hi Mark - yes, I had some code that disabled the AllowBypassKey property. I suspect that may have been the culprit to my issues. It was quite a few versions ago and I don't have the code anymore, so I can't say exactly what it was, but I believe it was on one of the hidden system tables.

I have since started a new database that does not include the code and all is well.
 

Users who are viewing this thread

Top Bottom