maccten2000
Programmer
Hi All
I have code which imports an excel sheet into a MS Access Database as a linked Table. I then have a Query which selects all the items in the table and inserts them into another table.
My problem with this is the user gets to select the xls sheet they wish to import. The SQL statement that moves the Linked Table records into the Access Database Table is column specific for example
Select col1,col2,col4 from Linked_table.
If the user selects an incorrect spreadsheet where these columns dont exist Access automatically prompts me for the missing columns
Instead of being prompted i would like to catch an error and send it to the user that they have selected an incorrect spread sheet.
Can anyone help me on this
Cheers
I have code which imports an excel sheet into a MS Access Database as a linked Table. I then have a Query which selects all the items in the table and inserts them into another table.
My problem with this is the user gets to select the xls sheet they wish to import. The SQL statement that moves the Linked Table records into the Access Database Table is column specific for example
Select col1,col2,col4 from Linked_table.
If the user selects an incorrect spreadsheet where these columns dont exist Access automatically prompts me for the missing columns
Instead of being prompted i would like to catch an error and send it to the user that they have selected an incorrect spread sheet.
Can anyone help me on this
Cheers