General discussion

Locked

import / export

By dredd ·
how can i export an ascii text file in MS-access..

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

import / export

by rcole In reply to import / export

This code sample will give you many options to export to. Put it in the code module of a button and replace the appropriate names with your own.

Private Sub Ctl2F119AToFile_Click()
On Error GoTo Err_Ctl2F119AToFile_Click

DoCmd.OpenForm "Quarterly Utilization Form"
DoCmd.OpenQuery "Quarterly Utilization Temp Storage Update", acViewNormal, acEdit

****DoCmd.OutputTo acReport, "Quarterly Supply Utilization Report" **** This is the one that does the exporting..

DoCmd.CLOSE acForm, "Contract Information", acSaveNo
Call ResetYear


Exit_Ctl2F119AToFile_Click:
Exit Sub

Err_Ctl2F119AToFile_Click:
MsgBox Err.Description
Resume Exit_Ctl2F119AToFile_Click

End Sub

Collapse -

import / export

by dredd In reply to import / export

The question was auto-closed by TechRepublic

Collapse -

import / export

by AndrewF In reply to import / export

Personally I would use the Transfertext Command

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

example follows

DoCmd.TransferText acExportDelim, "Standard Output", _
"External Report", "C:\Txtfiles\April.doc"

If you look this up in the help you should find what you want

Andrew Fraser

Collapse -

import / export

by dredd In reply to import / export

The question was auto-closed by TechRepublic

Collapse -

import / export

by dredd In reply to import / export

This question was auto closed due to inactivity

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Software Forums