Rx_
Nothing In Moderation
- Local time
- Today, 04:42
- Joined
- Oct 22, 2009
- Messages
- 2,803
This is something I would normally code. In this case an outside consultant came in, and left. So they bring me the problem.
Nobody got a chance to respond, and I hacked the problem solved the problem.
The Question still remains:
Is there a way to expose the Saved Imports steps (script) in Access 2007?
Problem and solution: (now solved)
In External Data - there is a Saved Exports named Import-CCS Data - one Excel file at a location to import named CCS Data.xlms.
On a button Import CCS Excel Spreadsheet - the code:
Private Sub btnCCSImport_Click()
DoCmd.SetWarnings False
DoCmd.RunSavedImportExport ("Import-CCS Data") ' Failure here
DoCmd.SetWarnings True
End Sub
On the docmd.runsavedImportExport
Error 3011 The Microsoft Access database engine could not find the object 'TEST'. Make sure the object exists and that you spell its name and the path name correctly. If 'TEST' is not a local object, check your network connection or contact the server administrator.
Found the extension for excel in the Saved Imports was wrong. Changed that, now the error message is:
Sheet2 is an invalid name: (the name is 2012) - Is there some script exposed for the saved imports?
Changed the name of Sheet 2 from 2012 back to Sheet2
Now the code works!
Question: Does the Import include some script that can be exposed?
Microsoft insist that any new file must meet the Saved Import requirements. It just doesn't mention how it can be validated or where the steps are stored:
http://office.microsoft.com/en-us/a...port-or-export-operation-HA001226020.aspx#BM1
If someone else created this and left no documentation - how are we able to guess how to recreate it? Datatypes, primary key and other options can vary.
Nobody got a chance to respond, and I hacked the problem solved the problem.
The Question still remains:
Is there a way to expose the Saved Imports steps (script) in Access 2007?
Problem and solution: (now solved)
In External Data - there is a Saved Exports named Import-CCS Data - one Excel file at a location to import named CCS Data.xlms.
On a button Import CCS Excel Spreadsheet - the code:
Private Sub btnCCSImport_Click()
DoCmd.SetWarnings False
DoCmd.RunSavedImportExport ("Import-CCS Data") ' Failure here
DoCmd.SetWarnings True
End Sub
On the docmd.runsavedImportExport
Error 3011 The Microsoft Access database engine could not find the object 'TEST'. Make sure the object exists and that you spell its name and the path name correctly. If 'TEST' is not a local object, check your network connection or contact the server administrator.
Found the extension for excel in the Saved Imports was wrong. Changed that, now the error message is:
Sheet2 is an invalid name: (the name is 2012) - Is there some script exposed for the saved imports?
Changed the name of Sheet 2 from 2012 back to Sheet2
Now the code works!
Question: Does the Import include some script that can be exposed?
Microsoft insist that any new file must meet the Saved Import requirements. It just doesn't mention how it can be validated or where the steps are stored:
http://office.microsoft.com/en-us/a...port-or-export-operation-HA001226020.aspx#BM1
If someone else created this and left no documentation - how are we able to guess how to recreate it? Datatypes, primary key and other options can vary.
Last edited: