>HI Eric,
>Thank you for your help. Can you give me an example, I mean, where do I store the result ? It is easy to issue MyVar = AccRst.RecordCount. But if I use Select count(*)..., I need to use a command object. Where can I store the result of the select count ?
No need for a Command object.
You need to do something like that:
dim lngRecord as long
rst.open "SELECT COUNT(*) FROM table1 WHERE ...", cn
lngRecord = rst.fields(0).value
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com