Record count of a Delete Query

aziz rasul

Active member
Local time
Today, 12:28
Joined
Jun 26, 2000
Messages
1,935
Is there a way of doing a Record count of a Delete Query using VBA? I want to activate a delete query only when a certain number of records will be deleted.
 
I think if you use DAO there's a RecordsAffected property.
 
But don't you have to execute the delete query first? I don't want to action the delete query first but establish how many records will be deleted before I make up my mind whether to delete.
 
Why don't you run a different SELECT query to count the number of records that will be deleted?
 
No problem. If that doesn't work there may be something you could do in ADO or JET to determine it. After all, if you don't turn warnings off you get that pop-up message that says "You're about to delete ..so and so.. number of rows"

My typical philosophy is if Access can already do it, then there must be a way for me to do it as well.

Cheers.
 

Users who are viewing this thread

Back
Top Bottom