Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2002
    Thanked 0 Times in 0 Posts

    Move control to the right (Access 2000)

    Move the control to the right of the form and then back

    I have a control on the form called Current.I want to find a code for giving a comand for the control to go to the right side
    of the form,and and then to go back to the same position on closing the form.I know that there is a function called MoveSize but i do not
    know how to use it. The Left property of the control is 5,988cm. Or perhaps there is another function?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: Move control to the right (Access 2000)

    MoveSize is meant to change the size and position of the entire form (or report).

    To move a control on a form, simply change its Top and/or Left property. In VBA, these coordinates are expressed in twips.
    1 inch = 72 points = 1440 twips (and 1 inch = 2.54 cm.)
    You can get the width of the form by retrieving Me.InsideWidth.

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Crystal Beach, FL, Florida, USA
    Thanked 41 Times in 40 Posts

    Re: Move control to the right (Access 2000)

    As Hans said, you can change a control's location on the form merely by changing it's Top and/or Left properties. And you don't have to worry about changing it back. Any changes you make in a control's location via code while it is open is temporary, and the control will revert back to it's normal starting position each time you open the form (that is, unless the form was in design mode while you moved it).
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts