Charlotte Foust
cfoust at infostatsystems.com
Thu Feb 17 15:41:17 CST 2005
What properties are you looking for, Susan? AccessObjectProperties aren't the same as Access form properties. They're really custom properties. According to help: The AccessObjectProperties collection contains all of the custom AccessObjectProperty objects .... Here's an example of setting and retrieving AccessObjectProperties: Public Function FormProperties() Dim dbs As Object 'pointer to currentproject Dim obj As AccessObject 'pointer to specific member _ of container collection Dim prp As AccessObjectProperty Dim strDescription As String Set dbs = CurrentProject For Each obj In dbs.AllForms Debug.Print obj.Name, obj.Properties.Count If obj.Properties.Count = 0 Then obj.Properties.Add "Foo", True End If For Each prp In obj.Properties Debug.Print prp.Name, strDescription, prp.Value Next prp Next obj End Function Charlotte Foust -----Original Message----- From: Susan Harkins [mailto:ssharkins at bellsouth.net] Sent: Thursday, February 17, 2005 12:12 PM To: 'Access Developers discussion and problem solving' Subject: RE: [AccessD] enumerating all properties in all forms Yeah, the Help doesn't really give too much information, but my guess is that the AccessObjectProperties aren't the same as the form properties. I need to get at the form's properties for ALL the forms, not just the open ones, so I need to use the AccessObject. Susan H. Hi Susan Perhaps simply no AccessObjectProperty is present ..? /gustav >>> ssharkins at bellsouth.net 17-02-2005 20:43:45 >>> The following procedure seems to totally skip the second For Each loop. No error, it just skips it, as if there are no properties in the Properties collection, which may be the case. I realize we're dealing with different collections and I may not be referencing things right. Any help? Thanks! Susan H. Public Function EnumAllFormProp() 'Print the name and setting for 'each property in every form. Dim obj As Access.AccessObject Dim prp As Access.AccessObjectProperty For Each obj In CurrentProject.AllForms Debug.Print obj.Name For Each prp In obj.Properties Debug.Print prp.Name Debug.Print prp.Value Next Next End Function -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com