Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 10th, 2006, 10:15 PM
John Graham
Guest
 
Posts: n/a
Default Export CSV and update column with Now()

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
Default 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
Default 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
Default 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.

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles