Total Visual SourceBook

Total Visual SourceBook CD and Printed Manual

Microsoft Access/ Office 2016, 2013, 2010, and 2007 Version
is Shipping!

New features in Total Visual SourceBook for Access, Office 2007 and VB6

Supports Access/Office 2016, 2013, 2010 and 2007, and Visual Basic 6.0!

Separate version for Access/Office 2003, 2002, and 2000.

Separate version for:
Access 97/95

View all FMS products for Microsoft AccessAll Our Microsoft Access Products

SourceBook Info:

Why SourceBook?


"The code is exactly how I would like to write code and the algorithms used are very efficient and well-documented."

Van T. Dinh, Microsoft MVP




Microsoft Access, Office/VBA, VB6 Modules royalty-free source code libraryMicrosoft Access Modules royalty-free source code libraryMicrosoft Access VBA and VB6 Module Library Free trial of Total Visual SourceBook for Microsoft Access, Office, VB6 and VBA

Module: MSysObjectsInfo in Category Microsoft Access : Objects from Total Visual SourceBook

Retrieve Access object information from the MSysObjects table using VBA and VB6.

Procedure List

Procedure Name



(Declarations) Declarations Declarations and private variables for the modMSysObjectsInfo module
AccessObjectsToArray Procedure Builds a zero based array containing a dictionary (list) of all Access objects using the MSysObjects table. The array includes the object type and the object name.
AccessObjectsToTable Procedure Builds a dictionary of Access objects to a table. If the table exists, it is emptied. If the table does not already exist, it is created. The created table has the following structure: FIELD NAME FIELD TYPE ObjectType Text(10) ObjectName Text(64)
GetAccessID Procedure Get the internal Access ID number for an object. Access maintains a unique long integer id number for every object in the database. This function returns that value.
GetAccessIDInfo Procedure Get the name of the object associated by the internal Access ID number. Access maintains a unique long integer id number for every object in the database. This function returns the object with the specified value.

Example Code for Using Module: MSysObjectsInfo

' Example of modObjectInfo
' To try this example, do the following:
' 1. Create a new form in your copy of Sample.mdb (in the Total Visual SourceBook sample directory).
' 2. Create a command button 'cmdTest'
' 3. Paste this code into the form's module

Private Const cstrTable As String = "Categories"

Private Sub Form_Open(Cancel As Integer)
  cmdTest.Caption = "Test Access object information functions"
End Sub

Private Sub cmdTest_Click()
  Dim astrNames() As String
  Dim intCounter As Integer
  Dim lngAccessID As Long
  Dim strName As String

  ' Example of AccessObjectsToArray
  AccessObjectsToArray CurrentDb, astrNames
  For intCounter = LBound(astrNames) To UBound(astrNames)
    Debug.Print "Object: " & astrNames(intCounter)
  Next intCounter

  ' Example of AccessObjectsToTable
  AccessObjectsToTable CurrentDb, "FMS Object Dictionary"

  ' Example of GetAccessID
  lngAccessID = GetAccessID(CurrentDb, cstrTable, acTable)
  Debug.Print "Object ID: " & lngAccessID

  strName = GetAccessIDInfo(CurrentDb, lngAccessID)
  Debug.Print "Name for Object ID " & lngAccessID & " is " & strName

End Sub

Microsoft Access Module LibraryOverview of Total Visual SourceBook

The source code in Total Visual SourceBook includes modules and classes for Microsoft Access, Visual Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily add this professionally written, tested, and documented royalty-free code into your applications to simplify your application development efforts.

Additional Resources