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: Forms_ADP in Category Microsoft Access : Forms from Total Visual SourceBook

Routines for Microsoft Access forms in Access Data Projects (ADPs) using VBA.

Microsoft Access 2013 no longer supports ADPs. This code only runs in Access 2000, 2002, 2003, 2007 and 2010.

Procedure List

Procedure Name

Type

Description

(Declarations) Declarations Declarations and private variables for the modForms_ADP module
GetFormRecordNumberADP Procedure Get the current record number of a form in an ADP.
GetFormRecordCountADP Procedure Get the total records of a form in an ADP
IsFormOnFirstRecordADP Procedure Determine if the current record of a form in an ADP is on the first record
IsFormOnLasttRecordADP Procedure Determine if the current record of a form in an ADP is on the last record
ListFillTablesADP Procedure Provides a list fill function for a list/combo box for a list of tables in an ADP database.

Example Code for Using Module: Forms_ADP

' Example of modForms_ADP
' Microsoft Access 2013 no longer supports ADPs. This code only runs in Access 2000, 2002, 2003, 2007 and 2010.
'
' To try this example, do the following:
' 1. Create a new form in an ADP that is connected to the 'Northwind' sample database (or another SQL Server Database that contains tables)
' 2. Set the form's RecordSource property to the 'Categories' table (or another table that contains one or more records)
' 3. Add a command button named 'cmdTest'
' 4. Add a list box named 'lstTables'
' 4. Paste this code into the form's module

Private Sub cmdTest_Click()

  ' Example of GetFormRecordNumberADP
  Debug.Print "Record number: " & GetFormRecordNumberADP(Me)

  ' Example of GetFormRecordCountADP
  Debug.Print "Record count: " & GetFormRecordCountADP(Me)

  ' Example of IsFormOnFirstRecordADP
  If IsFormOnFirstRecordADP(Me) Then
    Debug.Print "On first record"
  Else
    Debug.Print "Not on first record"
  End If

  ' Example of IsFormOnLasttRecordADP
  If IsFormOnLasttRecordADP(Me) Then
    Debug.Print "On last record"
  Else
    Debug.Print "Not on last record"
  End If

End Sub

Private Sub Form_Open(Cancel As Integer)
  lstTables.RowSourceType = "ListFillTablesADP"
  cmdTest.Caption = "Test ADP Form"
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