Solved

Access - Saved Imports

Posted on 2011-02-21
7
1,071 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now