Disable the 'Design' button

  • Thread starter Thread starter Pete
  • Start date Start date
P

Pete

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

Many thanx.
 
I have taken on a db (previous author not unavailable)
where this button is disabled - so the question still
stands...
 
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.
 
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.
 
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
 
Back
Top