Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help creating a Schema.ini file

Status
Not open for further replies.

SiberBob

Programmer
Aug 28, 2002
107
US
MS Access 2000: I have read the docmd.transfertext help file and it indicates:
specificationname
A string expression that's the name of an import or export specification you've created and saved in the current database.
For a fixed-width text file, you must either specify an argument or use a schema.ini file, which must be stored in the same folder as the imported, linked, or exported text file. To create a schema file, you can use the text import/export wizard to create the file. For delimited text files and Microsoft Word mail merge data files, you can leave this argument blank to select the default import/export specifications.

Ok, what is the text import / export wizard? I have created a spec in the tables view and doing a file/get external data/Import/Advanced button... but how do I get that to a schema.ini? or do I need to start somewhere else? I want to import a fixed width text file...
 
If you go through the File/Get External Data/Import menu options, then select the table you want to import, then on the first page of the Wizard, click at the first position of each column to specify where each column starts. Then click on "Advanced..." so you can finish the specifications. Put in the name for each field as defined in your table within Access. Correct the data type as necessary. When finished, click on the Save As... button. At this point you can specify any name you wish for the inport specs. After entering the name, click on OK, then OK, then Cancel.
In your VBA code you can use this name of your specs on the DoCmd.TransferText.

Hope this helps
Vic

PS: I have no idea about the schema.ini file. But I have used both inport and export specs like this several times.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top