Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    May 2002
    Location
    Florence, Oregon, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can I access an internal print line counter in VBA (Access 2003)

    I am generating an Access report. I need to make various VBA decisions based upon the current print line

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

    Re: Can I access an internal print line counter in VBA (Access 2003)

    I'm not aware of an internal counter that is exposed to the user. You can use the Top property of the Report - it represents the distance (in twips, 1440 twips = 1 inch) between the top of the page and the top of the current section.

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Can I access an internal print line counter in VBA (Access 2003)

    That isn't how Access does it. The report is formatted multiple times in order to determine whether a "keep together" section will fit on the current page. To my knowledge, there is no line counter involved at all, only the Top property and the heights of the footers.
    Charlotte

  4. #4
    3 Star Lounger
    Join Date
    May 2002
    Location
    Florence, Oregon, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Can I access an internal print line counter in VBA (Access 2003)

    Thanks Hans and Charlotte,
    Top sounds like a good idea if I can get it to work. I did some experiments displaying Top

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

    Re: Can I access an internal print line counter in VBA (Access 2003)

    As I mentioned in my reply, you must use the Top property of the report itself, i.e. Me.Top. What it refers to depends on where you use it. If you use Me.Top in an event of the Detail section, it refers to the distance of the top of the detail section to the top of the page. You can check if this is above, or below, a set limit.

  6. #6
    3 Star Lounger
    Join Date
    May 2002
    Location
    Florence, Oregon, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Can I access an internal print line counter in VBA (Access 2003)

    Got it. It works beautifully.

    Thanks again,

    John

Posting Permissions

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