Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jun 2005
    Location
    Connecticut, USA
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    height property (Access 2000)

    I am trying to alter the appearence of a report using vba code. So far I have the code in the On Format Section. I basically want to find the height of one text box, and make the height of other text boxes equal to that height. The height for the originally text box can change from record to record because it can grow. All the boxes being changed are allowed to grow as well. I don't think I am using the height property correctly. My code so far is:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Dim Height
    Height = Me.TextBox_0.Height

    Me.TextBox_1.Height = Height
    Me.TextBox_2.Height = Height
    Me.TextBox_3.Height = Height

    End Sub

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

    Re: height property (Access 2000)

    Height is not a good name for a variable, since it is exaclty the same as the name of the property. Try using sngHeight (sng stands for Single) instead:

    Dim sngHeight As Single
    sngHeight = Me.TextBox_0.Height
    ...

Posting Permissions

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