![]() |
Exporting Access Tables To Epi Info |
|
| IIHE | Education | Getting Started With Microsoft Access | Exporting Access Data to Epi Info | ||
To analyze your data, you will need to use Epi Info. Epi Info cannot read Access files directly, so you will need to export the data to a format that Epi Info can understand.The best way to export the data to Epi Info is using dBase files (these have an extension of dbf). You will need to do some preparation before exporting the data. Here are a few rules:
- Text fields cannot be longer than 80 characters. When you design a table, Access automatically sets the length of all text fields to 255 characters. More of the time, your text fields will be much shorter than this. You change the length of the fields in the design view of the table. See Using Tables for details. If you want to export from a query that needs work, you can convert the results of the query to a table using Make-Table (covered in Creating a Make-Table Query) or using Save As/Export... from the File menu
- Epi Info field names are limited to 10 characters. Access automatically truncates fields to 10 characters when you export the data. However, if two fields would have the same name, Access will generate an error message and not export the data. If you have this problem, make a copy of the table and rename the fields in the copy. If you rename the original table, queries and report will not work correctly.
- Epi Info field names must be alphanumeric (consisting of only letters and numbers). Epi Info automatically converts spaces into underlines.
- Epi Info field names must begin with a letter.
To export the data, open the table or query in Access that you want to export and then choose Save As/Export.. from the File menu.
Make sure that the To an External File or Database button is checked and then click OK:
We're back to the standard File Save dialog. Click on the pop-up next to Save as type and choose dBASE 5(*.dbf). To make it easier to import into Epi Info, save the file in the Epi Info directory and give it a short file name with no more than 8 characters. Also, the name shouldn't have any spaces or punctuation (except minus signs) in the name. This will make it much easier to import the data into Epi Info.
If you are exporting from a query that you just designed, you may get the error:
What this error really means is that the query wasn't saved before you started exporting the data. Just save the query and start the export over again.
Once you have successfully exported the data, run Epi Info and choose Import Files from the Programs menu:
Use the mouse to check the dBase box. Under the Input File Name, enter the name of the database you want to load (e.g., Query5.dbf) or press Enter to open the File Pick List.
The Output File Name will automatically change to the name you entered on the input line with the extension REC. You can enter a more descriptive name if you want. Just remember that Epi Info is DOS based and the name must follow the 8.3 naming convention. When the information is correct, click on the OK button:
Hopefully you will get a message similar to the above telling how many records have been imported. However, you may get a message like:
Unfortunately, Epi Info doesn't give a very descriptive error message. Make sure that the table you exported from follows the rules given at the beginning of this article.
Once the data is imported into Epi Info, you can use all the of its feature on the data as if you had entered the data directly into Epi Info.
Exporting Access Data to Excel | Getting Started With Microsoft Access | End of Tutorial