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!

Exporting to Fixed Width text file - formatting problems

Status
Not open for further replies.
Sep 29, 2002
8
US
I have a query designed that creates all of the data in the proper order and formatting (mostly). On my main form I have a command button with the Click event set up as follows:

Private Sub cmdRunReport_Click()
DoCmd.TransferText transfertype:=acExportFixed, _
specificationname:="TodayReport Export Specification", _
tablename:="qryTodayReport", _
filename:="c:\windows\desktop\today.txt", _
hasfieldnames:=False
MsgBox "The Report is now on your desktop."
End Sub

The problem is - I need to define justification and 0-fill on select columns - any ideas how to go beyond the specification parameters to edit these results?
 
Also - how would I declare "%USERPROFILE%\desktop\today.txt" instead of "c:\windows\desktop\today.txt" to be WinOS version independent?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top