Results 1 to 10 of 10
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Grow Rectangular box (Access 2000)

    Hello,
    I have a report in which I have Comments. I also have a rectangular box around each record to define them. The comments are set to "grow" if it gets lengthy but the rectangular box does not grow with it. Consequently, the wording goes below the
    Louise

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

    Re: Grow Rectangular box (Access 2000)

    You need to draw the box in code. See ACC2000: How to Shrink and Grow a Rectangle in a Report.

  3. #3
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Grow Rectangular box (Access 2000)

    Thanks Hans! Will check it out!
    Louise

  4. #4
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Grow Rectangular box (Access 2000)

    Hi Hans,
    Sorry it took so long to get back to you. I tried the example you suggested. Worked great with Northwind's example, but mine is a little diffferent. My rectangular box surrounds the entire record like a frame and is only on the form. It is not associated with any text box. I use it to visually separate the records.

    The problem with mine is that my "comments" field sometimes extend below the "frame" that was set up for the form. I looked at the properties for the rectangle but it doesn't have anything that I can adjust that I know of. Maybe that just the way it is?

    Thanks
    Louise

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

    Re: Grow Rectangular box (Access 2000)

    I'm confused - in the first post in this thread, you mentioned a report, now it appears to be about a form.

  6. #6
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Grow Rectangular box (Access 2000)

    Hi Hans,
    Sorry for the confusion. It's been a confusing day. <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>

    It is a report. I guess in my mind I was looking at the "form" of it. Sorry.
    Louise

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

    Re: Grow Rectangular box (Access 2000)

    You can keep the Left, Top and Right coordinates of the box fixed,
    Do you know which control will determine the "bottom" of the detail section? If so, you can use that to determine the Bottom coordinate for the box. For example, to draw a rectangle that starts 0.1" right and down from the upper left corner of the detail section, is 6" wide and extends to 0.1" below the bottom of a control named txtNotes, you can use this code:

    Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
    Dim sngBottom As Single
    Me.ScaleMode = 5 ' inches
    sngBottom = (Me.txtNotes.Top + Me.txtNotes.Height) / 1440 + 0.1
    Me.Line (0.1, 0.1)-(6.1, sngBottom), vbBlack, B
    End Sub

  8. #8
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Grow Rectangular box (Access 2000)

    Hi Hans,
    Thanks for the reply. I'm not sure what you mean.

    I have attached a stripped down version of the database for you to look at and see what I mean.
    Thanks for all your help!
    Louise

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

    Re: Grow Rectangular box (Access 2000)

    Louise,

    In the attached version, I have removed the fixed box from the report named Restaurant Comments Report, and added code to draw a box at runtime:

    Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
    Me.DrawWidth = 12
    Me.Line (90, 120)-(11400, Me.Comments.Top + Me.Comments.Height + 60), _
    RGB(154, 154, 154), B
    End Sub

    The unit here is the default twips (1440 twips = 1 inch).

    I left the other reports unchanged.

  10. #10
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Grow Rectangular box (Access 2000)

    Thanks Hans! You're fantastic! <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>
    Louise

Posting Permissions

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