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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tabs in text file output 1

Status
Not open for further replies.

harryevan

Programmer
Apr 22, 2005
1
US
I ned to extract data to a "formatted" text file.
Basically there is a report header area and a columnar detail line, where the report's header labels, detail column headers and data need to be separated by tabs for import to another application as well as an option to import in Excel.

So far I don't see any way of doing this within the VB and Access help (on the first few layers, at least.) has anyone done this sor of thing in Access reports, or does it require something in VBA or C#?
 
I'm not sure if I understand correctly.

Instead of

[field1] - [field2] - [field3],

do you want

[field1 & Tab & field2 & Tab & field3]

as output?

If that's the case, I'd use a query, something like:

[field1] & Chr(9) & [field2] & Chr(9) & [field3]

and then export the query to a text file.

You could do that in a report, too, but the Tab (=Chr(9))
would be displayed as "".


TomCologne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top