Locked Out of DB! Please Help!

bballhermit

Registered User.
Local time
Today, 06:49
Joined
Oct 14, 2010
Messages
40
I have developed a VBA check on launch of my Access 2007 database application to see if the linked back-end database is found. Something is wrong with my code, and now I am locked out from editing my database. When I open it, I get my vbCritial message box notifying me that the back-end db is not found, which is followed by a doCmd.Quit call in my VBA code. How can I open my accdb file long enough to remove my Quit line of code so I can continue developing? I have put so much work into this and don't have a backup copy (mistake).
 
have you tried opening it while holding your Shift key?
 
Thank you so much! I'm new to Access. Does using the shift key just disable anything set to run on launch?
 
It opens the database in "developer mode" essentially. It bypasses anything set for startup including the AutoExec macro or the startup optioins, checking of table links, etc.

Now you can disable the shift key by some code which you can find by searching on DISABLE BYPASS KEY and you can have something reset it so you can use it.
 
Ok, thank you.

So, I am using the code in the first response here to check before my user logon box pops up whether or not the back-end database can be found.

http://bytes.com/topic/access/answers/866587-checking-linked-tables-startup

It is throwing code 3265 even when the back-end database is linked and found properly. Any ideas as to how to correct this? Thanks.

Post the code you are using for your database (the exact code you are using). And when you do, use code tags here so the code stays formatted as such.

codetag001.png
 
Bob, I'm thinking this code tags image you've got might be good for the FAQ.
 
Ok, so, when the db is opened, a user logon form is the first to open. The load event for this form that throws error 3265 even when the back-end db is found is as follows.

Code:
Private Sub Form_Load()
On Error GoTo Err_FormLoad

Const conLINKED_TABLE As String = "tblUsers"
 
If Len(CurrentDb.TableDefs(conLINKED_TABLE).Connect) > 0 Then
    CurrentDb.TableDefs(conLINKED_TABLE).RefreshLink
Else
    MsgBox "The PMBS database was not found.  Please be sure you have access to \\pathonmynetwork", vbCritical, "PMBS"
End If
 
Exit_Form_Load:
    Exit Sub
 
Err_FormLoad:
    Select Case Err.Number
        Case 3011, 3024, 3265
            MsgBox "The PMBS database was not found.  Please be sure you have access to \\pathonmynetwork", vbCritical, "PMBS"
            DoCmd.Quit
    End Select
    
    Resume Exit_Form_Load
    
End Sub

Thanks for your help!
 

Users who are viewing this thread

Back
Top Bottom