Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Scrolling
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 30365 of 31576
Post > Topic >>

Scrolling

by "Phil Stanton" <phil@[EMAIL PROTECTED] > May 26, 2008 at 09:46 AM

I have a form with an Image Allocation Plan

Option Compare Database
Option Explicit

    Dim AllocationPlanWidth As Long
    Dim AllocationPlanHeight As Long

Private Sub AllocationPlan_Click()

    If AllocationPlan.Width < Me.Width Then         ' Normal size
        SpaceTypeID.SetFocus
        SpaceAllocationSub.Visible = False
        LabelClickPicture.Visible = False
        AllocationPlanWidth = AllocationPlan.Width
        AllocationPlanHeight = AllocationPlan.Height
        AllocationPlan.Width = Me.Width                 ' Expand
        AllocationPlan.Height = Me.Section(0).Height
        Me.ScrollBars = 3
    Else
        SpaceAllocationSub.Visible = True
        LabelClickPicture.Visible = True
        AllocationPlan.Width = AllocationPlanWidth      ' Restore to 
original
        AllocationPlan.Height = AllocationPlanHeight
        Me.ScrollBars = 0
    End If

End Sub

As you see from the above code, on clicking the image it enlarges, and on 
clicking again it restores it to the original size. I also have to hide a 
subform SpaceAllocationSub to show the larger image.

Interestingly ( and probably fortuitously) each time you do a pair of
clicks 
the image gets a bit bigger. I suspect that the form size is changing.

Problem is that with the bigger image I have to make the form's scrollbars

visible. If you scroll down to the bottom left of the form, then click the

image to restore it to the smaller size, I loose the top of the form.
How can I ensure that I scroll to the Top Left before going to the smaller

image?

Phil
 




 3 Posts in Topic:
Scrolling
"Phil Stanton"   2008-05-26 09:46:51 
Re: Scrolling
"Stephen Lebans"  2008-05-27 00:59:49 
Re: Scrolling
"Phil Stanton"   2008-05-27 09:33:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 22:55:52 CST 2008.