Counting Records in query

A real begineer

Registered User.
Local time
Today, 09:24
Joined
Nov 4, 2000
Messages
74
I am trying to set up a module to create a query field that counts the number of records.

the module I have coded reads:

Function GetNextCounter(pvar As Variant) As Long
Dim Counter

Counter = 0
' Initialize variable.
While Counter < 20 ' Test value of Counter.
Counter = Counter + 1 ' Increment Counter.
Wend ' End While loop when Counter > 19.

but this seems to return 0 in the query?
 
you can us a recordset object and count the records that way....If you want some sample code email me.
 

Users who are viewing this thread

Back
Top Bottom