G.5. AccessObject

The AccessObject object refers to a particular object within any of the following collections: AllDatabaseDiagrams, AllForms, AllFunctions, AllMacros, AllModules, AllQueries, AllReports, AllStoredProcedures, AllTables, and AllViews. This is an all-purpose object that can be used to determine whether an object is dependent upon another object or whether an object is open in the database.

It has its own properties, described in the following table, that you can implement within your code.

PropertyData TypeDescription
CurrentViewAcCurrentView EnumReturns the current view for the specified Access object.
DateCreatedDateReturns the date the AccessObject was created.
DateModifiedDateReturns the date the AccessObject was modified.
FullNameStringSets or returns the full path of the object.
IsLoadedBooleanDetermines whether the object is currently loaded.
NameStringReturns the name of the object.
ParentObjectReturns the collection of which the object is a member.
PropertiesAccessObjectProperties collectionReturns the AccessObjectProperties collection for the object.
TypeAcObjectType EnumReturns the type of the AccessObject.

AccessObject has two methods you can use:

MethodArgumentsDescription
GetDependencyInfoNoneReturns a DependencyInfo object that represents the database objects that are dependent upon the specified object.
IsDependentUponObjectType, ObjectNameReturns a Boolean value that indicates whether the specified object is dependent upon the database object specified in ...

Get Access™ 2007 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.