arunakumari02
Registered User.
- Local time
- Today, 15:26
- Joined
- Jun 2, 2008
- Messages
- 91
I have a form with months Jan --- Dec.
When click on the scroll bar the months should be moved and the year should be updated.
For Example:
Year(2008)
Jan Feb .............Dec
When I click on scroll bar it
Year(2009)
Feb Mar April ......Dec Jan
The year should be updated once the month reaches January.
Code:
My code does not updated year. Any hints?
Private Function ScrollHorizontal(intMoveMonth As Integer)
txtYear1 = Format(CDate("1/1/" & Year(Date)), "yyyy")
txtMonth1 = DateAdd("m", intMoveMonth, CDate("1/1/" & txtYear1))
Debug.Print "txtMonth1"; txtMonth1
For intMonth = 2 To 12
Forms("frmxx")("txtMonth" & (intMonth)) = DateAdd("m", intMonth - 1, txtMonth1)
Next
End Function
When click on the scroll bar the months should be moved and the year should be updated.
For Example:
Year(2008)
Jan Feb .............Dec
When I click on scroll bar it
Year(2009)
Feb Mar April ......Dec Jan
The year should be updated once the month reaches January.
Code:
My code does not updated year. Any hints?
Private Function ScrollHorizontal(intMoveMonth As Integer)
txtYear1 = Format(CDate("1/1/" & Year(Date)), "yyyy")
txtMonth1 = DateAdd("m", intMoveMonth, CDate("1/1/" & txtYear1))
Debug.Print "txtMonth1"; txtMonth1
For intMonth = 2 To 12
Forms("frmxx")("txtMonth" & (intMonth)) = DateAdd("m", intMonth - 1, txtMonth1)
Next
End Function