Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot view properties on a form

Status
Not open for further replies.

netsmurph

Technical User
Mar 19, 2003
63
GB
I am taking over a project to modifiy an existing ms access db. It has been designed nearly soley using code to manipulate forms and associated controls.

It is proving hard to unravel it as there is no doco and objects are not named consistently.

I need to be able to bring up the properties of the open forms to view controls, but cannot find where in the code this is disabled.

Does anyone know where i should be looking>?

TIA

Andrew
 
Just to confirm (and elimiate the obvious), you do have the form open in Design View?
 
No - it is open in normal view (but if you right click on it properties is greyed out).
 
Hi!

Can you get into design view and, if you can, have you tried it? If you can't, are you working with an .mde file instead of a .mdb?



Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
If the Form's Pop Up property is set to YES, Properties is grayed out in Normal View (when the form is actually being run) but Design View should be available!

The Missinglinq

There's ALWAYS more than one way to skin a cat!
 
as jebry said, if it's an .mde file, design view is out
of the question.
See if there is an .mdb file somewhere, if not, transfer all
objects to another DB...

But since it appears you have access to the VBE window,
then I suspect you're not using an .mde file,
missinglinq's suggestion seems pertinant.

Now, for my point...

Dim objContainer As Container
Dim objDoc As Document, frm As Form, prop As Property

For Each objContainer In CurrentDb.Containers
If objContainer.Name = "Forms" Then
For Each objDoc In objContainer.Documents

DoCmd.OpenForm objDoc.Name, acDesign, , , , acHidden

Set frm = Forms(objDoc.Name)
For Each prop In frm.Properties
Debug.Print objDoc.Name & "; " & prop.Name & " = " & prop.Value
Next
DoCmd.Close acForm, objDoc.Name, acSaveNo

Next
End If
Next
 
Zion7

Sorry for the delay in responding - this code is helpful to get a list of all of the properties on my form.

The problem is that there are 577(!) on one form and what I really want to be able to do is see which of these controls have event procedures associated with them.

Do you know if this is possible?

Many thanks for your help so far.

Andrew
 
see which of these controls have event procedures
Unless you play with an MDE simply go to VBE (Alt+F11)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
you could try,

Dim objContainer As Container
Dim objDoc As Document, frm As Form, prop As Property

For Each objContainer In CurrentDb.Containers
If objContainer.Name = "Forms" Then
For Each objDoc In objContainer.Documents

DoCmd.OpenForm objDoc.Name, acDesign, , , , acHidden

Set frm = Forms(objDoc.Name)
For Each prop In frm.Properties
If prp.Value = "[Event Procedure]" Then
Debug.Print objDoc.Name & "; " & prop.Name & " = " & prop.Value
End If
Next
DoCmd.Close acForm, objDoc.Name, acSaveNo

Next
End If
Next


 
Many thanks Zion - this was useful - what i realised was that the main form has been designed with tabs with related controls on each one - by clicking on the dropdown in design view - this brings up all of the controls for that tab!

Makes life a whole lot easier!

Thanks for your help

Andrew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top