Weeknumbers to calendar component?

H

hanski

Hi

I have put a calendar activex component into my form.

I wonder if it is possible to get also weeknumbers involved in
calendar component?


Hannu
 
M

missinglinq via AccessMonster.com

Not sure exactly what you mean by "get... involved in calendar component." If
you place a textbox on your form named *WeekNumber* and then use this code
(where YourCalendarName is the actual name of your ActiveX calendar)

Private Sub YourCalendarName_Click()
WeekNumber = Format(YourCalendarName, "ww")
End Sub

it will place the week number in the textbox.
 
R

Ron2006

also

weeknumber = Datepart("ww",yourCalendarName)


Datepart can return the following based on the interval as follows:
Interval- will return
-------- --------------
yyyy Year
q Quarter
m Month
y Day of year
d Day
w Weekday
ww Week
h Hour
n Minute
s Second

Ron
 
M

missinglinq via AccessMonster.com

That's what I love about Access! There's ALWAYS more than one way to skin a
cat!

;0)>
 
Top