Open Access file for editing

H

HotRod

I have an access file that a program wrote for our agency years ago,
instead of starting from scratch I'd like to see if I can just change some
of the reports in this access database. The problem is that every time I
open the access file it loads immediately to a custom page and does not
allow me to edit anything or look at the tables and forms. What do I have to
do to be able to edit it?
 
D

Dirk Goldgar

HotRod said:
I have an access file that a program wrote for our agency years ago,
instead of starting from scratch I'd like to see if I can just change
some of the reports in this access database. The problem is that
every time I open the access file it loads immediately to a custom
page and does not allow me to edit anything or look at the tables and
forms. What do I have to do to be able to edit it?

That depends on how the application was secured. First try just holding
down the Shift key while the database is opening. That may bypass the
startup settings.

If the database was delivered as an MDE, not an MDB file, then you can
look at and modify the tables and queries, but you won't be able to
modify the design of the forms, reports, or modules.

If the database was secured with user-level security, such that you have
to log in with user name and password when you open it, then you may or
may not have design permissions on any of the objects. If you don't,
you're out of luck unless you can get the name and password of a user
with design permissions.
 
D

David Widener

Also if the Bypass key has been turned off you can run code from another
database that will open it up like the code below, just plug it into a module
in an outside database:

Option Compare Database
Option Explicit

Sub SetBypassProperty()
Const DB_Boolean As Long = 1
ChangeProperty "AllowBypassKey", DB_Boolean, True
End Sub

Function ChangeProperty(strPropName As String, varPropType As Variant,
varPropValue As Variant) As Integer
Dim dbsCurrent As Database, dbsDBName As Database, prp As Variant
Const conPropNotFoundError = 3270

Set dbsCurrent = CurrentDb
Set dbsDOC2002 = DBEngine.Workspaces(0).OpenDatabase("Q:\DBName.mdb")
On Error GoTo Change_Err
dbsDOC2002.Properties(strPropName) = varPropValue
ChangeProperty = True

Change_Bye:
Exit Function

Change_Err:
If Err = conPropNotFoundError Then ' Property not found.
Set prp = dbsDBName.CreateProperty(strPropName, _
varPropType, varPropValue)
dbsDBName.Properties.Append prp
Resume Next
 
Top