Connecting Tech Pros Worldwide Help | Site Map

Export CSV and update column with Now()

  #1  
Old August 10th, 2006, 10:15 PM
John Graham
Guest
 
Posts: n/a
I thought this would be easier, however I seem to be struggling with
this.

I'd like to create a command button that will look at a certain query I
have created and export the records as a csv file, and also update a
field called dateModified to Now(). That way the next time I run the
query, it looks for null records in dateModified and only executes
records that have not been processed.

I've seen two approaches mentioned. TransferText, and output file in
VBA. I'm fine with either, just need to find a good example.

John

  #2  
Old August 11th, 2006, 03:35 AM
pietlinden@hotmail.com
Guest
 
Posts: n/a

re: Export CSV and update column with Now()



Help file anyone?

docmd.transferText acExport, queryName, "C:\filename.csv"
currentdb.execute "UPDATE MyTable SET dateModified=Now WHERE
dateModified IS NULL;"

  #3  
Old August 11th, 2006, 05:15 AM
John Graham
Guest
 
Posts: n/a

re: Export CSV and update column with Now()



Thanks, got me started.... we must have different versions.

I had to use
DoCmd.TransferText acExportDelim, , "QUERYNAME", "c:\export.csv

pietlinden@hotmail.com wrote:
Quote:
Help file anyone?
>
docmd.transferText acExport, queryName, "C:\filename.csv"
currentdb.execute "UPDATE MyTable SET dateModified=Now WHERE
dateModified IS NULL;"
  #4  
Old August 11th, 2006, 10:25 AM
pietlinden@hotmail.com
Guest
 
Posts: n/a

re: Export CSV and update column with Now()



John Graham wrote:
Quote:
Thanks, got me started.... we must have different versions.
Nope, I have senility and was doing it from memory.

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert Csv or text file to Access table using c# JH answers 1 November 16th, 2005 03:15 PM