Need count of records imported

Angel69

Registered User.
Local time
Yesterday, 19:32
Joined
Jun 11, 2013
Messages
86
I have set up a macro to import an Excel spreadsheet. I added a message box that pops up when the import is done. I'd like for it to give a record count to confirm the correct number were loaded and I'd like for it to stop loading if there is an issue. For instance, the user added a field to the spreadsheet that was not in my table so when I ran the macro to import I got a message that the field was not found but I still got the 'import was successful' message and records were loaded. I would think it would fail like it normally does when you do it manually but the records were in there. Thanks for any help!
 
I'd like for it to give a record count to confirm the correct number were loaded
don't think you can do this with a macro, in VBA it would be

Code:
dim mydb as currentdb
mydb.execute("INSERT INTO.....")
msgbox "No of records inserted = ", mydb.RecordsAffected
 

Users who are viewing this thread

Back
Top Bottom