Date Serial

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a unbound text box in my form and would like that undound text box to
state the current week # of the year and when the dates on that week are from
e.g., if this week is week 20 in 2005

Week# 20 dates from 05/08/2005 - 05/14/2005

Please Help!
 
JOM said:
I have a unbound text box in my form and would like that undound text box
to
state the current week # of the year and when the dates on that week are
from
e.g., if this week is week 20 in 2005

Week# 20 dates from 05/08/2005 - 05/14/2005

Please Help!
 
I have a unbound text box in my form and would like that undound text box to
state the current week # of the year and when the dates on that week are from
e.g., if this week is week 20 in 2005

Week# 20 dates from 05/08/2005 - 05/14/2005

Please Help!

Hm... The DatePart function has a "ww" operand which returns the
current week of the year. There are some optional arguments to let you
define what *you* mean by "the first week of the year" - see the
online help. But with the appropriate definition, you should be able
to set the Control Source of the textbox to something like:

="Week# " & DatePart("ww", Date(), <optional arguments>) & " dates
from " & DateAdd("d", 1 - Weekday(Date()), Date()) & " - " &
DateAdd("d", 7 - Weekday(Date()))


John W. Vinson[MVP]
 
I am attempting to do something simlar for my report however I'm unsure how
what you put in for the <optional arguments> I'm looking at my first week of
the yeare as being 12-31-06 to 1-6-06
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top