The best technique for demonstrating Import is to export data first. Choose a table and select File | Export. In the Export dialog find a directory to save the new file and give it a name. Select the export the type, "Text files (*.txt;*.csv;*.tab;*.asc)". The type is dependent on the application to which the data is to be imported.Most applications expect and can accept data in a delimited format. The character used as a field delimiter is typically a comma, but may a semicolon, a space or other character. It could be a tab, as with QuickBooks files. A particular Export wizard opens dependent on the type of file to be exported. In the case of the delimited file the options are Delimited or Fixed Width. In the window in the lower part of the dialog, notice the change in the structure of the data as a switch is made between these 2 options. Also, the Next dialog is affected by this choice.
For Delimited files, notice the choice of delimiter characters. Choose the required one and a Text qualifier. This is typically a double quote, however, check the receiving application. Notice the change in the data window when "Include field names in first row" is checked. When exporting to Excel for example, a check mark would automatically create column headings.
For Fixed Width files, in the Next dialog, the field can be sized according to the expecting applications specifications. One button that appears on both types of files is the Advanced button. Basically, this button enables a user to create a standard template of the export if it is expected that the table is to be exported again. We'll examine this further when we review macros, where a specification or template is required when automating the export or import process.
Importing files is simply the inverse of Export. Hopefully, this demo provides some clues as to the different types of data that can be imported.
The second part of our discussion on getting external data included linking. An example might be using Contacts in a Outlook database.
To decide whether to import data into access, we need to know 1. The data is only used in Access 2. That Access generally works faster with its own tables, and, imported data to those tables 3. It is not necessary to have the latest data from a supporting application. That is, it's not likely that QuickBooks and your Access application will be open at the same time.
The reasons to link or not to link is based on 1. the data is being used by a a program that is open, used and updated continually like Outlook. 2. you can operate on these files in the same way as it the files were part of Access only 3. Speed of access to the linked tables is not important. As noted by the link to the Outlook DB that the usual access activities were slower with the linked files
Next month, we look at an Access application that imports several files and links to another.
![]()
Site Disclaimer Suggestions? E-Mail to webmaster@noccc.org