Access help states "Returns the number of records affected by the most
recently invoked Execute method."
However this doesn't work using currentdb. Each usage of currentdb is a new instance of the current database. Instead you must use an explicitly defined database.
That is use
Dim db as database
db.execute "<some sql>", dbfailon error
CountOfRecords = db.recordsaffected
Currentdb.execute "<some sql>", dbfailon
CountOfRecords = Currentdb.recordsaffected
[ Access | Main |
Auto FE Updater distribute new and updated Front End databases to your users with several mouse clicks.
Granite Fleet Manager - the best designed fleet maintenance tracking and management system available
Website copyright © 1995-2013 Tony Toews