NextTable

Method
Returns the table number that comes after a given table number.

Category
Tables

 

Syntax
Function NextTable(ByVal TableNo As Long) As Long

TableNo
The number of a table. If this is set to zero, the first table number is retrieved.

 

Example

'Case "NextTable"

'Lists all tables at the Server

  tmpVar = CF1.NextTable(0)

  If VarType(tmpVar) <> vbLong Then

  logWr "NextTable failed. It didn't return a long"

  End If

  tmpLong = CF1.NextTable(0)

  tmpLong2 = 1 'Used to count the no of tables

  Do While Not tmpLong = 0

  tmpLong = CF1.NextTable(tmpLong)

  tmpLong2 = tmpLong2 + 1

  Loop

  logWr "Used NextTable to scan through " & Trim$(Str$(tmpLong2)) & " tables."

 

  CF1.CloseTable hTable

 

Comments
NextTable allows you to scan all of the table numbers within a database. It returns the table number that comes after TableNo or zero when it reaches the end of the table number list.

For more information about tables, see the Application Designer's Guide.



© 2009 Microsoft Corporation. All rights reserved.