Need help exporting a table to CSV format with record count

G

GIAN

HI,
I have a table that I would like to export in CSV format to a location on the
network. I think I have the code that works for that but my chanllege is that
I need to include a count of the records in the table at the end of the file.
Here's the code that I have so far:
Private Sub Command0_Click()

On Error GoTo Err_Command0_Click

DoCmd.TransferText acExportDelim, , "APRIA-CLAIMSYYYYMMDD", "H:\Fleet\DOT\
ALERT DRIVING\APRIA-CLAIMS" & Format(Date, "YYYYMMDD") & ".csv", True

Beep
MsgBox "Your Files are Ready!", vbInformation, ""
Exit_Command0_Click:
Exit Sub

Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click

End Sub


Any suggestions would be greatly appreciated.

Regards
 
J

Jeff Boyce

As far as I know, an Access table doesn't have a record count, just the
records. If you export a table, you get the table.

Maybe what you need to do is create a report that includes all the records,
AND includes a record count, then export THAT...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
G

GIAN

Jeff,
Thanks for the suggestion. I will give it a shot.

Jeff said:
As far as I know, an Access table doesn't have a record count, just the
records. If you export a table, you get the table.

Maybe what you need to do is create a report that includes all the records,
AND includes a record count, then export THAT...

Regards

Jeff Boyce
Microsoft Office/Access MVP
HI,
I have a table that I would like to export in CSV format to a location on
[quoted text clipped - 26 lines]
 

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