If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Access 2007 - DoCmd.RunCommand acCmdImport
in Access 2003, I used "DoCmd.RunCommand acCmdImport" as part of a routine
to make importing data from Excel spreadsheets easier. After upgrading to Access 2007 it no longer works. Error Number 2002: You tried to perform an operation involving a function or feature that was not installed in this version of Microsoft Access. is there an equivalent way to programmatically open the "Get External Data" dialog in 2007? Thanks in advance. |
#2
|
|||
|
|||
Access 2007 - DoCmd.RunCommand acCmdImport
could it be: "DoCmd.TransferText acCmdImport" the command you are looking for?
Rui "deko" wrote: in Access 2003, I used "DoCmd.RunCommand acCmdImport" as part of a routine to make importing data from Excel spreadsheets easier. After upgrading to Access 2007 it no longer works. Error Number 2002: You tried to perform an operation involving a function or feature that was not installed in this version of Microsoft Access. is there an equivalent way to programmatically open the "Get External Data" dialog in 2007? Thanks in advance. |
#3
|
|||
|
|||
Access 2007 - DoCmd.RunCommand acCmdImport
Not for Excel.
Use the TransferSpreadsheet method. Docmd.TransferSpreadsheet. See VBA Help for details on how to use it. -- Dave Hargis, Microsoft Access MVP "Rui" wrote: could it be: "DoCmd.TransferText acCmdImport" the command you are looking for? Rui "deko" wrote: in Access 2003, I used "DoCmd.RunCommand acCmdImport" as part of a routine to make importing data from Excel spreadsheets easier. After upgrading to Access 2007 it no longer works. Error Number 2002: You tried to perform an operation involving a function or feature that was not installed in this version of Microsoft Access. is there an equivalent way to programmatically open the "Get External Data" dialog in 2007? Thanks in advance. |
#4
|
|||
|
|||
Access 2007 - DoCmd.RunCommand acCmdImport
sorry, I didn't notice the excel bit.
"Klatuu" wrote: Not for Excel. Use the TransferSpreadsheet method. Docmd.TransferSpreadsheet. See VBA Help for details on how to use it. -- Dave Hargis, Microsoft Access MVP "Rui" wrote: could it be: "DoCmd.TransferText acCmdImport" the command you are looking for? Rui "deko" wrote: in Access 2003, I used "DoCmd.RunCommand acCmdImport" as part of a routine to make importing data from Excel spreadsheets easier. After upgrading to Access 2007 it no longer works. Error Number 2002: You tried to perform an operation involving a function or feature that was not installed in this version of Microsoft Access. is there an equivalent way to programmatically open the "Get External Data" dialog in 2007? Thanks in advance. |
#5
|
|||
|
|||
Access 2007 - DoCmd.RunCommand acCmdImport
DoCmd.RunCommand acCmdImportAttachExcel
This is what I was looking for. Works great. I like the [ Do you want to overwrite table 'tblYourTable'? ] warning when importing Excel worksheets as tables that have the same name as an internal table. In Office 11 there was no warning and I had databases destroyed by mistaken overwrites. I resorted to opening a one-record recordset on each internal table (about 50 tables) and leaving them open until the import was complete. This effectively locked the table and prevented any chance of overwrite. I still have this code in place to be on the safe side. |
Thread Tools | |
Display Modes | |
|
|