Exporting Access data into a field-position specific text file

G

Guest

Is there any way to export contents of a Access table into a text file where
the field positions are already set?

For example.. I want to export field1-First Name, field2-Last Name
INTO a text file where ..
Position
First Name 1-25
FILLER 26
Last Name 27-40

Any help would be greatly appreciated. I currently have to export the table
into Excel, save as *.PRN - then format it using a text pad macro.. Is there
anything out there to make life easier?

Thanks
 
R

Ronald Roberts

J said:
Is there any way to export contents of a Access table into a text file where
the field positions are already set?

For example.. I want to export field1-First Name, field2-Last Name
INTO a text file where ..
Position
First Name 1-25
FILLER 26
Last Name 27-40

Any help would be greatly appreciated. I currently have to export the table
into Excel, save as *.PRN - then format it using a text pad macro.. Is there
anything out there to make life easier?

Thanks

Try exporting it as a fixed width text file. Under the Advanced button
(lower left of the export wizard) you can define the starting position
and width of each column.

Ron
 
G

Guest

Thank you very much!!!!! Exactly what i needed.

Ronald Roberts said:
Try exporting it as a fixed width text file. Under the Advanced button
(lower left of the export wizard) you can define the starting position
and width of each column.

Ron
 
G

Guest

Would there be a way to "import" a file specification list w/ fillers
included or would i have to re-create the exact same positions every time i
export the table?
 
R

Ronald Roberts

J said:
Would there be a way to "import" a file specification list w/ fillers
included or would i have to re-create the exact same positions every time i
export the table?

:

J,

Sorry it has taken so long. I've been away.
Look at help TransferText.
There is an acImportFixed transfer type and you can use a specification.
Do the import manually the first time and save the specification for
future imports.

DoCmd.TransferText [transfertype][, specificationname], tablename,
filename[, hasfieldnames][, HTMLtablename]

Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top