IsDependentUpon Method

Microsoft Access Visual Basic

Show All Show All

IsDependentUpon Method

Returns a Boolean value that indicates whether the specified object is dependent upon the database object specified in the ObjectName argument.

expression.IsDependentUpon(ObjectType, ObjectName)

expression    Required. An expression that returns an AccessObject object.

ObjectType    Required AcObjectType. The type of database object to check for dependency.

AcObjectType can be one of the following AcObjectType constants:
acDataAccessPage Not supported for this method.
acDefault
acDiagram Not supported for this method.
acForm
acFunction Not supported for this method.
acMacro Not supported for this method.
acModule Not supported for this method.
acQuery
acReport
acServerView Not supported for this method.
acStoredProcedure Not supported for this method.
acTable

ObjectName    Required String. The name of the database object to check for dependency.

Remarks

This method will return a run-time error if any of the following conditions are true:

  • The AccessObject object specified in the ObjectType argument is an unsupported type.
  • The Track name AutoCorrect info setting (Tools menu, Options dialog box, General tab) is disabled. You can use the following code to enable the Track name AutoCorrect info setting and update the dependency information for all of the objects in the database:

    Application.SetOption "Track Name AutoCorrect Info", 1

  • You have insufficient permissions to check the dependency information for the specified AccessObject object.
  • The database object specified in the ObjectName argument cannot be found.
  • This method is being called from an Access project (.adp).