Importing spreadsheet to a table from a button?

  • Thread starter Thread starter 72185
  • Start date Start date
7

72185

We recieve information weekly and sometimes more frequent then that.
I have a access database set up with a table, queries and reports.
What I would like to do is instead of having to manually go in and
import the table to make it more user friendly to the folks that don't
know how to use access that well. I figure this will have to be done
through code to call the worksheets, but I would like to create a
button on a form that when selected it will automatically import the
spreadsheet directly to the table. If it has to call the wizard that
still would not be as bad and navigating through everything but if
anyone knows of how to do this task simply and efficiently please let
me know. Thanks.

-WS
 
We recieve information weekly and sometimes more frequent then that.
I have a access database set up with a table, queries and reports.
What I would like to do is instead of having to manually go in and
import the table to make it more user friendly to the folks that don't
know how to use access that well. I figure this will have to be done
through code to call the worksheets, but I would like to create a
button on a form that when selected it will automatically import the
spreadsheet directly to the table. If it has to call the wizard that
still would not be as bad and navigating through everything but if
anyone knows of how to do this task simply and efficiently please let
me know. Thanks.

-WS

In VBA help, look up the TransferSpreadsheet method.

DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9,
"MyImportTableName", "c:\FolderName\WorkbookName.xls", False,
"MyWorksheetName!A1:K31"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top