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

Replacing empty fields with todays date

P: 34
Hi guys, im a bit of a novice being thrown in at the deep end ! Using MS Access 97 i have a table with data that is updated once a day from an Excel spreadsheet. I need a way of identifying when data was added to this table so i have added an extra field (titled 'Date') and need to create a query that updates the empty field with todays date, so that every day this query will run and replaces any empty data in the field with todays date.

However im at a complete loss, can anyone help ?

May 17 '07 #1
Share this Question
Share on Google+
3 Replies

P: 103
You can use the “NZ” function to replace null fields with a set value
Expand|Select|Wrap|Line Numbers
  1.  Exp1: nz([AssignDate],Format(Now(),"mm/dd/yyyy"))
You can put this in the field location in the query (design view). This will create a new column Exp1 with the current date 05/17/2007 in any field that doesn’t currently have a value in the current column AssignDate and if there is a current value will leave it alone.
May 17 '07 #2

P: 34
Cheers, that works fine.

Is there any way of updating the table with this data when running the query.?
May 17 '07 #3

P: 34
Yes !

i did it..

thanks again
May 17 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.