Form - Week Number

gsandy

Registered User.
Local time
Tomorrow, 07:01
Joined
May 4, 2014
Messages
104
I have a form with date formatted textbox (Week_Ending) and a number formatted textbox (Week_No). On exiting Week_No I wish to show the corresponding week number in Week_No using DatePart function. I wish to know the correct code (related to the two textboxes) and where to put the VBA code.

Thanks Sandy
 
Week_No= DatePart("ww",[Week_Ending],1)
Note:
First day of the week
1=Sunday
2=Monday
3=Tuesday...
 
Thanks Mike, your code worked just like I wanted it to. Cheers Sandy
 

Users who are viewing this thread

Back
Top Bottom