Export data to text file

P

Phileas

Hi all,

I need your help to solve a problem exporting MS Access data to a text
file.
I have a table with 5 fields: Name, LastName, Address, City, Country.
When I export the data I need Name and LastName on the first row -
Address, City and Country on the second row.
And so on with Name, LastName on the third row - Address, City,
Country on the fourth.
I tried with some easy code in VBA but it didn't work. I hope you can
help me and an example would be greatly appreciated.

Thanks a lot.

Filippo
 
J

John Spencer

Export a query instead of the table

SELECT [Name], LastName, Chr(13) & Chr(10), Address, City, Country
FROM YourTable

In query design view
--Add your fields Name and lastName
-- Enter CHR(13) & CHR(10) in the next field
-- Enter Address, City, and Country fields next
-- Save the query and export it


'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 

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