Change Year as Scroll bar moves

arunakumari02

Registered User.
Local time
Today, 15:30
Joined
Jun 2, 2008
Messages
91
As I move the scrollbar, I have to change the year once the month reaches Dec. There are 2 textboxes, one shows year and the other next year. The textboxes can expand and shrink.

For example:

When I open the form the it shows Year 2008 and months jan, Feb. .......Dec.

As I scroll forward, now the months show as Feb, mar,........Dec, Jan. Now it should show Feb,Mar.........Dec as 2008 ,and Jan as 2009.

Any hints are appreciated.
Code:
 For intMonth = 1 To 12
    
        If Year(Forms!frmPipeline("txtMonth" & intMonth)) > Year(txtYear1) Then
                           
        
            txtYear2 = DateAdd("yyyy", 1, txtYear1)
            txtYear2.Left = txtYear1.Left + txtYear1.Width 

 
            'txtYear2.Width = how to set the width of txtbox 2
            
            txtYear2.Visible = True
            
        End If
        
    Next
    
Thanks
 
If you post a sample of what you are doing, I'll bet some bright poster will come up with a solution.
 
what has this got to do with a scroll bar?
 

Users who are viewing this thread

Back
Top Bottom