Kamis, 28 Juni 2012

RE: [MS_AccessPros] forms collection to get names by indexing like tabldefs

 

Hi Liz

You can use the Forms collection for all _open_ forms, and the CurrentProject.AllForms collection for (as the name suggests :-) _all_ the forms in the database, whether open or not.

Members of the Forms collection are Form objects.

Members of the AllForms collection are AccessObject objects.

Both of these objects have a .Name property.

Both collections have a .Count property and start indexing at 0, and both may be enumerated using a loop counter or a "For Each" loop.

Incidentally, you can also use the CurrentProject collections for other object types: AllReports, AllMacros and AllModules. Note that there are no AllTables or AllQueries collections - for these you use CurrentDb.TableDefs and CurrentDb.QueryDefs, respectively.

Best wishes,
Graham

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar