[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1093
  • Last Modified:

Access - Saved Imports

Hi,

I have saved import steps in Access. In previous versions of Access - I was able to view the SQL steps of the import. Please offer how I can view the SQL steps in Access 2007?

Thanks
0
tahirih
Asked:
tahirih
  • 3
  • 2
  • 2
3 Solutions
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Not sure if this will help, but it does show you how to run a saved import/export operation:

http://office.microsoft.com/en-us/access-help/run-a-saved-import-or-export-operation-HA001226020.aspx?CTT=3

I would assume at that point you could review the steps the operation will be using.
0
 
Helen FeddemaCommented:
What do you mean by the SQL steps?
0
 
tahirihAuthor Commented:
In former versions of Acces - when a file was imported/exported, I was able to view the SQL coding. I can no longer see this.
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
There's not really any sql coding involved in importing/exporting a file.

Can you describe how you did this in earlier versions? Perhaps we would have a better understanding then.
0
 
tahirihAuthor Commented:
Actually, in thinking more - I viewed the code in SAS - so I was confused with earlier versions of Access.

Sorry for all the time this question took.

However, if by chance you know a SQL code to import/export, please feel free to share.

Thank you for everyone's efforts and time.
0
 
tahirihAuthor Commented:
Thank you.
0
 
Helen FeddemaCommented:
Here is some code for importing and exporting text files and Excel worksheets:
strPath = Application.CurrentProject.Path
strWorkbook= strPath & "Customers.xls"

DoCmd.TransferSpreadsheet transfertype:=acExport, _
   spreadsheettype:=acSpreadsheetTypeExcel8, _
   tablename:="qryCustomers", _
   FileName:=strWorkbook, _
   hasfieldnames:=True

DoCmd.TransferSpreadsheet transfertype:=acImport, _
   spreadsheettype:=acSpreadsheetTypeExcel9, _
   tablename:=strTable, _
   FileName:=strWorkbook, _ 
   hasfieldnames:=True, _
   Range:=strRange

========================

Private Sub cmdExportTextDelimited_Click()

   DoCmd.TransferText transfertype:=acExportDelim, _
      tablename:="tblCustomers", _
      FileName:="D:\Documents\Examples\Export Delimited.csv", _
      hasfieldnames:=True

End Sub

Private Sub cmdImportTextDelimited_Click()

   DoCmd.TransferText transfertype:=acImportDelim, _
      tablename:="tblMonthlyData", _
      FileName:="D:\Documents\Examples\Monthly Data.csv", _
      hasfieldnames:=False

End Sub

Private Sub cmdExportTextFixed_Click()

   DoCmd.TransferText transfertype:=acExportFixed, _
      hasfieldnames:=True, _
      tablename:="tblCustomersLimited", _
      specificationname:="CL", _
      FileName:="D:\Documents\Examples\Export Fixed.txt"
      
End Sub

Private Sub cmdImportTextFixed_Click()

   DoCmd.TransferText transfertype:=acImportFixed, _
      specificationname:="CL", _
      tablename:="tblImportFixed", FileName:="New Hires.txt", _
      hasfieldnames:=True

End Sub

For some imports and exports, you need a specification, which is prepared by doing the import (or export) manually, and saving the setting to a specification file (use the Advanced button in the Import Text dialog to do this).

Open in new window

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now