alligning bars ar Hor. Scrollbar is moved

arunakumari02

Registered User.
Local time
Today, 15:35
Joined
Jun 2, 2008
Messages
91
I have grid with months Jan to Dec, 2008. As we move the scroll bar forward the months get moved and years.

( parantheses is just for knowing how it looks eg: (2007) )

Initially, when the form is opened: Jan Feb ........Dec
When scrolled forward: Feb Mar.........Dec Jan(2009)
When scrolled backward: Dec(2007) Jan........Nov
Now, as I move scrollbarse rectangular bars assigned according to their startdates.

For example : if the startdate is 11/1/1007 and duration is 2, when I open the form the bar should not be visible as current 2008 shows up. When I scroll backward , then the bar should be showed at Dec and Nov (2007).

Any hints are appreciated.

Code:
'the start date is before the grid.
        
               If rstxx!StartDate < txtMonth1 Then
              Forms!frmchange("rec" & intRow).Left = txtMonth1.Left
            Forms!frmchange("rec" & intRow).Visible = False
                                                  
               End If
 

                'the end date is before the grid
              
                 If  EndDate < txtMonth1 Then
                
                  Forms!frmchange("rec" & intRow).Visible = False
                
                  End If
 
I can't really picture what you're doing here, but I would guess something like this would be OK (if you can indeed extract some soft of fixed length for the "bars" that you are talking about)...
Code:
'the start date is before the grid.
        
               If rstxx!StartDate < txtMonth1 Then
              Forms!frmchange("rec" & intRow).Left = txtMonth1.Left [COLOR="Red"]+ some decimal here??[/COLOR]
            Forms!frmchange("rec" & intRow).Visible = False
                                                  
               End If
 

                'the end date is before the grid
              
                 If  EndDate < txtMonth1 Then
                
                  Forms!frmchange("rec" & intRow).Visible = False [COLOR="Red"]<--- is there 
                                   another way to identify the month by way of an
                                   integer here, and then performing a loop and 
                                   using "Visible" to get what you want??[/COLOR]
                
                  End If
 

Users who are viewing this thread

Back
Top Bottom