Forum Discussion
J0hn60rt0nmentions
May 25, 2020Copper Contributor
Default field in a table
In my database I a table with a field have a field called "Year" and at the moment this is set to a default for the current year i.e. 2019 and I have to change it each year. Can this field be update...
George Hepworth
May 25, 2020Iron Contributor
J0hn60rt0nmentions Instead of hard-coding a value, use the relevant Date function, which is Year(). Since you want to use the following year, not the current year, you'd use Year(Date())+1
J0hn60rt0nmentions
May 26, 2020Copper Contributor
George Hepworth Hi George, many thanks for the message. I have tried it it I get a error message say "Expression entered has a function containing the wrong number of arguments" I have tried it in most of the relevant formats Number, Date/Time/and Short text. Any ideas please. What I thought would happen would be, as the database went over in to the next year the year will be auto updated which is what happens in the Date() function.
- George HepworthMay 26, 2020Iron Contributor