Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Posts
    173

    Unanswered: Set Form Size Using Command Button

    I would like to se tthe size of a form using a command button.

    Ex:

    Button 1 - set form width to 5"
    Button 2 - set form width to 4"


    I tried using me.form.height = 3" and form.height = 3"

    and me.form.height = 4320 (which is Twips - 1440 twips = 1")

    can this be done?

    Thanks - AB

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    setting width/height

    Have you tried this

    Button 1 command:

    docmd.movesize ,,5000

    The docmd.movesize x,x,x,x might work.

  3. #3
    Join Date
    Nov 2003
    Posts
    1,487
    pkstormy is right. Keep in mind though.....1440 Twips = 1"
    Therefore:
    4" = 5760 Twips
    5" = 7200 Twips

    Last edited by CyberLynx; 01-24-05 at 20:11.

  4. #4
    Join Date
    Aug 2002
    Location
    Melbourne, Australia
    Posts
    111
    I find this useful when dealing with twips

    Put this in a module and name it say Utility

    Code:
    Public Const twips As Long = 1440
    Then when you have to refer to twips you just do this


    Code:
    docmd.movesize ,,5.24"*twips
    very handy if you want a control on a form to move to Left 2.345" top 1.437" you dont have to work out how many twips.
    Regards,



    John A

Posting Permissions

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