Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Moving item around on form (AXP)

    Hello All,
    I need to move a label on a form based on code. Here is what I am doing and it will not move the label:

    If strSortField = "wo_id" Then
    With text124
    .Visible = True
    .Top = 0.5
    .Left = 0.5
    End With

    No matter what, the label remains at the 0,0 position on the form. I can change the visible state and that seems to work fine.

    Thanks,
    Mark

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Moving item around on form (AXP)

    In VBA, position and size is measured in twips. There are 1440 twips to the inch, so setting .Top = 0.5 means that you shifted the top by an imperceptible 1/2880 part of an inch <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    If you meant 0.5", use .Top = 0.5 * 1440 etcetera. Or you can define a constant

    Const TwipsPerInch = 1440
    ...
    .Top = 0.5 * TwipsPerInch

  3. #3
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Moving item around on form (AXP)

    Thanks Hans,
    As soon as you mentioned twips, I remembered! It's been like four years since I have tried to do something like this on a form.

    Thanks,
    Mark

Posting Permissions

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