Link to home
Start Free TrialLog in
Avatar of pcalabria
pcalabriaFlag for United States of America

asked on

Need to use VBA to create CSV comma delimited file for Access 2k

Hello,

My access application has a problem and the Export Specification wizard will not work.  I don't have the original disk so I need to create a CSV file from a query programmatically.

The column names of the query will change from time to time, but the name will not.

Can anyone help?

I guess I can use a maketable query then the recordset object to walk through the code, but I would think there should be a more straight forward approach.  I tried using the recordset object to cycle through the query without any luck.

This is a weekend project for me, so I need to get this code working today.

Thanks.
SOLUTION
Avatar of Kelvin Sparks
Kelvin Sparks
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
chr$(34) by the way is the quote (") and using it is one way to get a quote inside a string argument.

Jim.
Avatar of pcalabria

ASKER

Thanks to both of you!

Kelvin,  I never was able to get this to work with a comma delimited file, but can see how this solution will help in the future.

Jim, you did it again!
Thanks!