getting total numbers of records from a filtered form

smoke

Registered User.
Local time
Yesterday, 21:51
Joined
Sep 2, 2004
Messages
18
hi, i was wondering what would be the best way to get the total records of a filtered form, sorry im new to this, i know its soemthing to do with the count() function in vba, but i dont know how to get it to point to a filtered recordsource, i also was curious why when i do a

me.filter = "thisfield =" & me.comboboxfieldname
me.filteron = true

why isn't this working? im doing this in a form witha subform, .. and im triyng to filter the main form, .. but i can't seem to get it to point to the main form (ive tried other ways, me.thisfield = me.comboboxfieldname , formname.form.filter = "") thanks in advanced for the help, its much appreciated.
 
dim rs as dao.recordset
set rs=me.recordsetclone
rs.movelast
'rs.recordcount gives the number of records
rs.close 'after you've saved/stroed the recordcount
 

Users who are viewing this thread

Back
Top Bottom