Solved

Access - Saved Imports

Posted on 2011-02-21
7
1,077 Views
Last Modified: 2012-05-11
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
Comment
Question by:tahirih
  • 3
  • 2
  • 2
7 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 450 total points
ID: 34946257
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
 
LVL 31

Assisted Solution

by:Helen_Feddema
Helen_Feddema earned 50 total points
ID: 34946463
What do you mean by the SQL steps?
0
 

Author Comment

by:tahirih
ID: 34947496
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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 450 total points
ID: 34950822
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
 

Author Comment

by:tahirih
ID: 34952479
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
 

Author Closing Comment

by:tahirih
ID: 34952488
Thank you.
0
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 34952601
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question