How can I count the number of records in Update query

danial

Board Regular
Joined
Apr 29, 2006
Messages
107
How can I count value in Update queryHow can I count the number of records in Update query

Because I don't want create normal query for count it.
Realy I want to count rec. before update data
any way for me?

Thanks
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
In code, I don't think you can do it.
Also, I don't think you can use an action query as a data source for another query.

The reason is that, whenever you work with records in a query, Access works with the associated Recordset -- and you cannot create a Recordset from an action query as far as I know.

So, if you want to know the Sum and the Count of a set of records, you need to work with a standard query -- you can see the Count on the warning that Access is about to update xx records, but that's about it.

Denis
 
Upvote 0
I have a form for interface with user.
I want to show the count of record on the form as below

Code:
My Form

Do you want to update [240] records
[Click hear for update]

but if that "query update" have not data.
I want to show
Code:
Can't not updata data now!
 
Upvote 0
Hi Danial
Instead of using the update query as the source for the number of records, use another query that uses the identical criteria to count how many records would be updated by the other query.
HTH, Andrew
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,397
Members
448,957
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top