Hi,
Can anyone help me how figure out a correct syntax for week no.
I have tblRev with fieldname
ate
I want access automatically display the week no. after
entering a Date in my field: Date.
Please can anyone help
Thanks
First off... it's best to NOT use the reserved word Date as a fieldname!
Access can (and will!) get it confused with the builtin Date() function, and
give you strange errors.
That said, you can have a textbox on your form or report bound to the date
field, and set its Format property to "ww" to display the (1 to 54) week
number; for more control, you can use
=DatePart("ww", [datefield], <optional parameters>)
See the VBA help for DatePart; the parameters let you specify just what you
mean by the first week of the year (what day does the week start - Monday or
Sunday or some other day? Can the first week of the year be only one day long,
or should Week 1 be the week of the first Tuesday? etc.)