Update Query to change Renew Date

GraemeG

Registered User.
Local time
Today, 23:21
Joined
Jan 22, 2011
Messages
212
Hello.

I wanted to create an update query to enforce all Renew Dates within my fields are atleast the current year.

I have created the following - see picture.

But all it does it changes everything to "Date" text within the fields.
Can I create an update query to do such a thing. I.e. The Current field has records with 2010 in and i want to update them to say 2011(current year)

Any help much aprpeciated
 

Attachments

  • UpdateQuery_RenewYear.jpg
    UpdateQuery_RenewYear.jpg
    57 KB · Views: 215
Remove the quote from "Date" --> Format(Date,"yyyy")
 
First question - what is the defnition of renew date? What determines what the renew date is going to be? Why store the renew YEAR instead of an actual date? What is the significance of that?
 
First question - what is the defnition of renew date? What determines what the renew date is going to be? Why store the renew YEAR instead of an actual date? What is the significance of that?

Sorry not sure what you mean.
The renew date fields are collected by a surveyor on another database then data is uploaded into this one. The purpose is to see what year an element on a building requires replacement. Such as windows, doors, kitchens etc.
The renew year cannot be less than the current year. however due to surveys taking place all the time, it can often be the surveyor selects the item to be replaced that year, but it doesnt get replaced and therefore needs updating to into the next year so to speak (the current year). So surveys last year containing some 2010 renew dates need updating to 2011(Current year)

I have tried removing the quotes from date and it auto puts them back in. Saying something about missing santax
 
Okay, thanks for the explanation.

As for the function - you need to use Date() in queries instead of just Date.
 
Okay, thanks for the explanation.

As for the function - you need to use Date() in queries instead of just Date.

I have tried this:
Date("yyyy") but this does not allow saying the expression has the wrong number of arguments.
 
RESOLVED:

Update to: Year(Date())
Criteria: <Year(Date())
 

Users who are viewing this thread

Back
Top Bottom