Disable the 'Design' button

P

Pete

Could someone please advise me with a coded method of
disabling this button in the database window (Access 97).

Many thanx.
 
P

Pete

I have taken on a db (previous author not unavailable)
where this button is disabled - so the question still
stands...
 
R

Rick Brandt

Pete said:
I have taken on a db (previous author not unavailable)
where this button is disabled - so the question still
stands...

If the design button is disabled it's likely because you have an MDE file
where design of code-based objects is not possible. The file extension
need not actually be "mde" in this case.

Is the button also disabled when you look at the tables and queries? MDEs
do not prevent design changes to these objects so if the button still works
for those then it is almost a certainty that you have an mde file.
 
P

Pete

The Design & New buttons are disabled on the Forms &
Reports & Mactos tabs respectively. and all three buttons
are disabled on the Modules tab.

The Tables and queries tabs have all buttons enabled.
 
P

Pete

Agreed Alex - thanx.
Just found the definitive way to test for MDE status:-

Public Sub IsMDE(strDB As String)
Dim db As Database
Dim prp As Property

Set db = DBEngine.OpenDatabase(strDB)

For Each prp In db.Properties
If prp.Name = "MDE" Then
If prp.Value = "T" Then
MsgBox "This is an MDE database!"
Exit For
End If
End If
Next prp
End Sub
 

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