Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    39

    Unanswered: Automatically Adjust subform size

    Is there a way to automatically adjust the size of a subform/ For example some data sets will have 20 records while others have 1. I don't wan't the larger user to have to scroll through each record and i dont want the small user to have a lot of empty space. Any ideas?

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    i suppose you could:

    Me!mysubform.recordsetclone.movelast
    recCount = Me!mysubform.recordsetclone.recordcount
    Me!mysubform.recordsetclone.movefirst 'if you want to
    Me!mySubForm.height = fixedBitHeight + recCount * theRowHeight

    ...but it seems a lot of fuss.

    izy

  3. #3
    Join Date
    Aug 2003
    Location
    SW Ohio
    Posts
    198

    Re: Automatically Adjust subform size

    In one of the form events (open, load, activate, got focus) put in the
    docmd.restore
    docmd.runcmd accmdsizetofitform

    and see how that works.
    Jim P.

    Supoorting Oracle, MSSQL7, Sybase 8, & Pervasive. Confusion Reigns

Posting Permissions

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