I have automated the process of importing an Excel spreadsheet into an Access database. The user will click a button on the switchboard in Access to begin the import. Before the spreadsheet data is actually transferred, I delete the records in the existing Access table by using a DOCMD.RunSql(Delete * from table) statement in the vba code behind the button. But, the message to confirm the records to be deleted always comes up.
Q: Is there anyway to automatically acknowledge this statement with a 'Yes" response so that the user does not have to answer it each time? Or...
Is there any other way to clear the exisiting data in the table? Idon't want the new records to append to the table and I want to keep the table structure intact.
The second part to this is if I use the confirmation statement to
"Delete Records Yes or No" is there a way to know what button was pressed? If the user pressed "no" then I want to know so I can bypass the import routine.
Q: Is there anyway to automatically acknowledge this statement with a 'Yes" response so that the user does not have to answer it each time? Or...
Is there any other way to clear the exisiting data in the table? Idon't want the new records to append to the table and I want to keep the table structure intact.
The second part to this is if I use the confirmation statement to
"Delete Records Yes or No" is there a way to know what button was pressed? If the user pressed "no" then I want to know so I can bypass the import routine.