Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    It'll grow... but wont shrink!!! (Access 97/SR2)

    Hi all,

    I have a report that has a detail section which can vary in size for each detail item. If I just have the text boxes containing the info, the form shrinks as it should, to keep everything neat.
    However, I tried putting some lines in to form a grid, with a function in the details on format section to set the size of the lines depending on how much data is in the detail section. I also tried putting an empty text box in with solid borders with the intention of the same border effect, also selecting its height through a function.
    In both instances, the Can Shrink option fails to work. The report looks fine until a larger detail is added, then if a smaller one follows, a gap is left as the detail height hasn't closed up.

    Does anybody happen to know a way round this problem? I tried setting the me.detail.height and got an error stating that it couldnt be changed as printing had started (i.e. formatting for printing).

    Any help would be much appreciated.

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

    Re: It'll grow... but wont shrink!!! (Access 97/SR2)

    Horizontal lines shouldn't be a problem. They should relocate themselves as the text boxes grow and shrink.

    For vertical lines that should be the entire height of the detail section, you can use the Line function.

    Const OneInch = 1440
    Line (XPos * OneInch, 0) - (XPos * OneInch, 22 * OneInch)

    draws a vertical line at XPos inch from the left hand side of the detail section. The coordinates for Line are in twips; 1 inch = 1440 twips. The maximum height of a section is 22 inch.

  3. #3
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: It'll grow... but wont shrink!!! (Access 97/SR2)

    Wow! How handy is that. Thanks Hans, it worked like a treat.

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

    Re: It'll grow... but wont shrink!!! (Access 97/SR2)

    Hello Phil,

    I got the idea from the Rptsmp97.mdb database from Microsoft. It contains lots of sample reports. You can download it here.

    Regards,
    Hans

  5. #5
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: It'll grow... but wont shrink!!! (Access 97/SR2)

    Thank Hans. That is a very handy database. There seems to be alot of good information in there.

Posting Permissions

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