By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,480 Members | 2,953 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,480 IT Pros & Developers. It's quick & easy.

acc2003: recordcount property or sql count question

P: n/a
hello-

i have created a tabular form using records from a specific query.
then users will filter out the specific data. the next step is to take
the count of the current records (daily open items), then use the
total number of daily open items to calculate the percentage to all
open items for the month.

my first question is how would i be able to capture the current
filtered openrecordset and count the records? would i use the
..recordcount or SQL count? the records will vary each month.

Set dbs = CurrentDb
Set RstTemp = dbs.OpenRecordset("")
with rsttemp
do until rstTemp.eof
rsttemp![field1].recordcount
rsttemp.movenext
loop
end with

thanks in advance and any help would be appreciated!! jung
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"JMCN" <pi******@yahoo.fr> wrote in message
news:27**************************@posting.google.c om...
hello-

i have created a tabular form using records from a specific query.
then users will filter out the specific data. the next step is to take
the count of the current records (daily open items), then use the
total number of daily open items to calculate the percentage to all
open items for the month.

my first question is how would i be able to capture the current
filtered openrecordset and count the records? would i use the
.recordcount or SQL count? the records will vary each month.

Set dbs = CurrentDb
Set RstTemp = dbs.OpenRecordset("")
with rsttemp
do until rstTemp.eof
rsttemp![field1].recordcount
rsttemp.movenext
loop
end with

thanks in advance and any help would be appreciated!! jung


I don't understand your code from row "with rsttemp".
To count the records in your recordset:

If rstTemp.RecordCount then
rstTem.MoveLast
NumRecs = rstTemp.RecordCount
Else
NumRecs = 0
End If

Ciao
Bruno
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.