By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,852 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

Export CSV and update column with Now()

P: 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

Aug 10 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a

Help file anyone?

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

Aug 11 '06 #2

P: n/a

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

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

pi********@hotmail.com wrote:
Help file anyone?

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

P: n/a

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

Aug 11 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.