Solved

Access - Saved Imports

Posted on 2011-02-21
7
1,085 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

732 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