Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Location
    Manchester
    Posts
    21

    Unanswered: Setting table Width and Height on Open

    How do I set the position and size of a table when it is opened using a button.
    I've used DoCmd.OpenTable OpenTable, acViewNormal, acAdd - to open the table but would prefer the position, height and Width to be set.

    Cheers

  2. #2
    Join Date
    Nov 2003
    Location
    LONDON
    Posts
    238
    One way of doing this is to create 2 forms. On one form create it as a datasheet view of your table. On the other form, place the datasheet as a subform. You can then put a button on the main form which can adjust the width and height of the subform. You would use code such as:

    Me("SubForm").Height = 3 * 567
    Me("subForm").Width = 5 * 567

    NOTE: all width/height measurements are in TWIPs. 567 TWIPs = 1 cm

    You can also adjust the forms width and height of the main form.

    There are other ways of adjusting the form, but these are more complicated, but helpfully the routines have been wrapped up in a class making them easy to use. Look at:

    http://www.mvps.org/access/forms/frm0042.htm
    http://www.mvps.org/access/general/gen0002.htm

    Regards
    Justin

Posting Permissions

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