y2k
04-08-2002, 02:51 AM
I have some Make Table Querys which are run every day. Is there a piece of code that I can put in to add an extra column which would have today's date in it every day?
Thanks for your help
Thanks for your help
|
View Full Version : Append date to table y2k 04-08-2002, 02:51 AM I have some Make Table Querys which are run every day. Is there a piece of code that I can put in to add an extra column which would have today's date in it every day? Thanks for your help Ally 04-08-2002, 05:46 AM You can do this in your make table query and then an update query. In design view of your make-table query, in a new column in the design grid, enter your new field, followed by double quote marks ie: 'TodDate': "" - then run the query. This will add a new column with blank entries. (Don't call it 'Date' as Access will get confused. In a new update query, enter your new field into the design grid. In the 'Update to' row, enter 'Date()'. Run this query. You can then pop both queries into a macro so you won't have to run both separately. HTH Ally [This message has been edited by Ally (edited 04-08-2002).] Pat Hartman 04-08-2002, 06:33 PM You don't need to do this in two steps. Just adding the new date column with a value of Date() will be sufficient. Add a new column to your make table query: MyNewDate http://www.access-programmers.co.uk/ubb/biggrin.gifate() or if you want date and time then, MyNewDate:Now() |