Counting records in query

Bud

New member
Local time
Tomorrow, 00:36
Joined
Oct 23, 2004
Messages
8
Hi All,

Sorry for being an amateur here, but I really hope you can point me to the right direction. What I need to do is to is to reference a global variable in a separate module to the total (count) of all the records in a select query.

I've read a lot of threads about counting records but I really have no clue what to do. What I need is something like:

glbMaxExportRecords = DCount([ID], qryExport) but that doesn't work.​

Can you help me out?
Thanks!
Bud
 
Sorry sam!

Sorry Sam for taking up your time. I feel so utterly stupid ...

I just forgot the @$%#^$ quotes ("") with the [ID] field:

glbMaxExportRecords = DCount([ID], qryExport)​
changed it to
glbMaxExportRecords = DCount("[ID]", qryExport)​

And it works like a charm :D

Pfffff (I was almost going crazy)

Thanks and have a nice weekend!
Bud.
 

Users who are viewing this thread

Back
Top Bottom