Show Database Objects

G

Guest

There was a time when I worked extensively with Access, but it's been a
while. I designed a database to hide the objects window, and I don't
remember how I did it. I now need to access some of those objects, and for
the life of me, I can't figure out how to show the database objects window.
The "show hidden objects" option is enabled in the tools > startup menu; the
F11 key doesn't work, even though it's set to use the special keys; neither
does holding the shift key down when opening the database. The "Display
Database Objects" option is checked (enabled) in the startup menu. The
database isn't split, so there's no front end/back end. When the database
opens, it displays a switchboard that I created. Any ideas about how to show
the objects window would be greatly appreciated.
 
A

Allen Browne

The normal way to show the database window again is to use SelectObject with
the InDatabaseWindow set to True.

Perhaps you have set the AllowBypassKey.
 
G

Guest

I have the same problem as Carl. I don't understand what you mean by
"indatbaseWindow" - I thought the SelectObject was method or action. All i
have is a macro that opens the form and there is no selectOject or
allowPassKey. I used to be able to open it by pressing Shift and database
name.
 
A

Allen Browne

In macro design, choose the SelectObject action.

In the lower pane, the last argument is:
In Database Window

Set that to Yes.

If you can no longer hold down Shift when the database opens, you may have
turned off one of these properties of the database:
Allow Special Keys
Allow Bypass Key
 
G

Guest

sorry i have no idea how to do this. I opened a Macro autoexec (in a
different database, one where i can see the objects when i press shift) and
didn't see the selectObjecxt action nor the argument you specified.

And i can't find those properties (Allow Special Keys Allow Bypass Key). I
looked in database properties, under tool options, in fact i checked each
item under tools but couldn't find those.

Again, I can open all other databases and access the objects window.

Thank you
 
A

Allen Browne

SelectObject should be available in the Action drop-down list in any macro
you care to create.

You can set Allow Special Keys through the menus:
Tools | Startup

The AllowBypassKey property can only be set with code. If it has been set to
False, you can set turn it back on with:
CurrentDb().Properties("AllowBypassKey") = True
If it has not been set, that yields error 3270.

If your menus have been changed, you can programmatically set
AllowSpecialKeys as well:
CurrentDb().Properties("AllowSpecialKeys") = True
 
G

Guest

The Allow Special Keys option has always been enabled. When I open the
database while holding down the shift key, the file opens, but there's only a
blank area displayed. The F11 key doesn't do anything. I use an AutoExec
macro to display a custom switchboard on startup, and I must have put
something in it to turn off the object display, but I can't edit the macro
because I can't get to it. I'm scratching my head on this one.
 
D

Douglas J Steele

Was AllowBypassKey set to False, so that holding down the shift key doesn't
do anything?

You may have to create a new database and import everything from the
existing one.
 
G

Guest

Thanks, Doug. I don't think the AllowBypassKey was set to False, but as I
mentioned, I can't get to the macro to edit. I think your suggestion to
create a new database and import is the only option left.
 
D

Douglas J Steele

You should be able to check AllowBypassKey using code like the following:

Function AllowBypassKeyStatus( _
DatabasePath As String _
) As String
On Error GoTo Err_AllowBypassKeyStatus

Dim dbTest As DAO.Database
Dim prpCurr As DAO.Property
Dim strStatus As String

If Len(Dir(DatabasePath)) = 0 Then
strStatus = DatabasePath & " doesn't exist."
Else
Set dbTest = OpenDatabase(DatabasePath)
Set prpCurr = dbTest.Properties("AllowBypassKey")
strStatus = "AllowBypassKey is set to " & prpCurr.Value
End If

End_AllowBypassKeyStatus:
On Error Resume Next
dbTest.Close
Set dbTest = Nothing
AllowBypassKeyStatus = strStatus
Exit Function

Err_AllowBypassKeyStatus:
Select Case Err.Number
Case 3270 ' "Property not found"
strStatus = "AllowBypassKey property doesn't exist"
Case Else
strStatus = "An Error " & Err.Number & _
" occurred: " & Err.Description
End Select
Resume End_AllowBypassKeyStatus

End Function

Call it in the immediate window of any database, passing the name of the
database to check:

?AllowBypassKeyStatus("C:\My Folder\MyDatabase.mdb")

If it turns out that the property has been set (and is equal to False), you
can try resetting it programmatically and then holding the Shift key down
while you open the database.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top