PC Review


Reply
Thread Tools Rate Thread

Capture number of appended/updated records

 
 
Chutney via AccessMonster.com
Guest
Posts: n/a
 
      31st Mar 2006
I run a procedure to append new records and update existing ones. The
procedure turns off warnings so that it will run without user intervention.
However, I would like to capture the usual Access notices about the number of
records to be appended or updated so that at the end of the procedure I can
display these numbers. Is it possible to do this?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...dules/200603/1
 
Reply With Quote
 
 
 
 
Marshall Barton
Guest
Posts: n/a
 
      31st Mar 2006
Chutney via AccessMonster.com wrote:

>I run a procedure to append new records and update existing ones. The
>procedure turns off warnings so that it will run without user intervention.
>However, I would like to capture the usual Access notices about the number of
>records to be appended or updated so that at the end of the procedure I can
>display these numbers. Is it possible to do this?



Use the Execute method instead of using RunSQL.

Set db = CurrentDb()
db.Execute "yourquery"
MsgBox db.RecordsAffected & " records were appended"
Set db = Nothing

--
Marsh
MVP [MS Access]
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help please - determine the number of records appended FatMan Microsoft Access VBA Modules 1 29th Aug 2009 12:36 AM
Capture number of records updated? Jeff Hunt Microsoft Access Form Coding 1 8th Jan 2008 11:18 PM
Number of records appended =?Utf-8?B?ViBSYW1vcw==?= Microsoft Access VBA Modules 2 1st Dec 2004 07:41 AM
Q: returning #rows appended/updated MarkD Microsoft Access 3 5th Aug 2004 06:32 PM
Returning the number of Appended records to a variable =?Utf-8?B?RHVuaw==?= Microsoft Access VBA Modules 1 6th Jan 2004 11:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:59 PM.