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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO REFERENCE FORMS NOT LOADED 1

Status
Not open for further replies.

Angelique

Technical User
Mar 9, 2001
127
AU
How do you reference forms that aren't loaded? I read up on objects.containers, documents & forms.

A small example code would be a good start to resolving my problem.

Any help out there?


Angelique
 
you (aparently) missed the collections. Each type of object in Ms. Access is a member of a collection (Forms, modules, etc). the queries and tables are a little mixed up, but since you are into forms, this doesn't matter. You can open any of these collections and itterate through them to retrieve their names and many of the properties.

Alternatively, there is a set of TABLES "MSys*", oe of them (MSysObjects) which includes all objects in the database, whith some arcane and obscure information embeded in strange codes held in various fields.

Fortunatly, two of the fields (Name and Type) are reasonably comprehensible. The query below will list all of hte objects, using these two fields.

SELECT MSysObjects.Name, MSysObjects.Type
FROM MSysObjects;


This produces the following "list" on my system - using a "Junque" database. By inspection, you should be able to determine that the Forms are of "type" -32768, so to get the list of JUST forms, include this value in the criteria row of yuour query.

Name Type
DataAccessPages 3
Forms 3
Modules 3
Reports 3
Scripts 3
SysRel 3
AccessLayout -32757
SummaryInfo -32757
UserDefined -32757
qryDet 5
tblGrade_Crosstab 5
modTest -32761
frmTestDots -32768
rptTournament -32764
qryUnionParamExample 5
modPenInfo -32761
qrySelExactStrFromField 5
modCkeckStrings -32761
qryEnenVal 5


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top