Property window popping up

M

Mark Schirle

I recently upgraded from 97 to A2k3. Sometimes when I open a form in
form view (not design view) the property window opens. I don't want my
users seeing this box ever. Why is it doing this and is there a way to
prevent it from happening.

TIA
 
W

Wayne Morgan

What you have run into is a new "feature" that allows you to make some
changes to the properties sheet in form view. If you make sure that the
properties dialog is closed before you save and close the last form in
design view, it will stay closed when you open the form in normal view.
While this is sometimes nice and expedient, making changes in normal view
has been suspected to cause corruption.

Open the form in Design View then open the Properties dialog. On the Other
tab, set Allow Design Changes to Design View Only.

To do this to all forms in your database, run this code from a standard
module.

Public Sub ChangeAllowDesignChanges(bolAllow As Boolean)
On Error GoTo CheckError
Dim obj As AccessObject, dbs As Object, strMsg As String
Set dbs = Application.CurrentProject
Application.Echo False
For Each obj In dbs.AllForms
DoCmd.OpenForm obj.Name, acDesign
'True = All Views, False = Design View Only
Forms(obj.Name).AllowDesignChanges = bolAllow
DoCmd.Close acForm, obj.Name, acSaveYes
Next obj

CleanUp:
Application.Echo True
Set obj = Nothing
Set dbs = Nothing
Exit Sub

CheckError:
strMsg = "Error # " & Err.Number & vbCrLf & Err.Description
MsgBox strMsg, vbOKOnly + vbCritical, "Error"
End Sub

Call the sub with the following command in the Immediate window:

ChangeAllowDesignChanges False

Use True or False as desired.
 

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