Automatically Assign Double Quotes to Null Values in .csv File

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

H

I need to export an Access database to a .csv file, with each unique data field beginning and ending with quotations. My problem lies with null values, or fields with no data. Access shows the quotations in the export wizard, but when I open the exported .csv file in Wordpad, the quotations have disappeared, leaving only commas separating the null fields. How can I go from this

"Smith","John", ,"123 Main St" - note the null value between first name and addres

to

"Smith","John","","123 Main St" - Note the null value is now surrounded by double quote

I have tried the Access Export text Wizard per recommendation from the Help section, but I don't see any solutions there. I don't know VBA at this point, but am willing to try if the answer lies in changing the Schema.ini file (which I am clueless about as well).
 
Try creating a query that uses Nz([MyField], """") instead of the actual
field. (That's 4 double quotes in a row). Export the query, rather than the
table.

--
Doug Steele, Microsoft Access MVP

(No private e-mails, please)



Darrin said:
Hi

I need to export an Access database to a .csv file, with each unique data
field beginning and ending with quotations. My problem lies with null
values, or fields with no data. Access shows the quotations in the export
wizard, but when I open the exported .csv file in Wordpad, the quotations
have disappeared, leaving only commas separating the null fields. How can I
go from this:
"Smith","John", ,"123 Main St" - note the null value between first name and address

to:

"Smith","John","","123 Main St" - Note the null value is now surrounded by double quotes

I have tried the Access Export text Wizard per recommendation from the
Help section, but I don't see any solutions there. I don't know VBA at this
point, but am willing to try if the answer lies in changing the Schema.ini
file (which I am clueless about as well).
 
Back
Top