Results 1 to 6 of 6
  1. #1
    mortonsafari is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2015
    Location
    Brisbane, Queensland, Australia
    Posts
    39

    Add symbol or mark halfway down page on print

    At Print, I want to have a mark ("---") or symbol ("<"), for example, show on the report page half-way down the page to act as a 'fold line'.
    What Code can I use to have this generated when the report prints?
    Any assistance greatly appreciated.


    Kind regards
    Mort

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Report design should show a ruler.
    calculate where half is, add dashes.

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    If your report is the simplest possible design and your report only takes one page and you have it laid out such that there is no detail section, or the detail section is part of the full height of the report, then ranman's suggestion will work, otherwise it's won't and you'd need to take into consideration things like:

    Does your report have a report header section?
    Does it have a page header section?
    Does the report have group/sort headers and/or footers?
    If so how tall are the group/sort headers and footers?
    Does it have a repeating detail section?
    If it does have a repeating detail section how tall is the detail section?

    I question why you'd need a dotted line to fold a page in half, if your folding is a manual process anyone ought to be able to fold in half without much issue just by matching corners. It's typically the tri-fold that may cause problems and it depends on the complexity of your report structure as to how you would approach this.

  4. #4
    mortonsafari is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2015
    Location
    Brisbane, Queensland, Australia
    Posts
    39
    Thanks guys.
    Ranman256's reply would work for Word, but not for Access where the various sections (header sections, detail and footer sections) can grow and shrink according to the information to be printed.
    Rpeare, I did have a simple On Page Event Procedure .......
    Private Sub Report_Page()
    'add a centre mark for hole punch
    Me.DrawStyle = vbSolid
    Me.DrawWidth = 10
    Me.Line (Me.Left - 1200, 7300)-Step(150, 0), vbBlue
    End Sub

    which printed a small mark when the report was printed.
    I use this to line up where to punch holes with a two-hole punch. (Just too lazy to fold the paper to create a centre mark to line up in the punch!).
    While this works well, I was investigating as to how I might be able to print a symbol such as a ' < ' (the less than sign = ASCII 60 or Hex 3C) in the position.
    Is there something like a "Me.Symbol" or a Chr() that would work.
    All assistance appreciated as I'm still learning . . . . . .
    Regards

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    I'm not sure you could do a symbol because those typically require a label or text box (or other control) on which to 'draw' the symbol. You could probably draw something other than a line though like a circle (which I think would be ideal for your purpose) using me.circle instead of me.line.

    https://msdn.microsoft.com/en-us/lib...ffice.11).aspx

  6. #6
    mortonsafari is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2015
    Location
    Brisbane, Queensland, Australia
    Posts
    39
    Many thanks for the lead rpeare . . .

    After some mucking around I have whittled things down to this which works for me . . . .

    Private Sub Report_Page()
    'add a centre mark for hole punch
    Const conPI = 3.14159265359
    Dim sngHCtr As Single, sngVCtr As Single
    Dim sngRadius As Single
    Dim sngStart As Single, sngEnd As Single

    sngHCtr = Me.ScaleWidth / 750 ' Horizontal center.
    sngVCtr = Me.ScaleHeight / 2 ' Vertical center.
    sngRadius = Me.ScaleHeight / 250 ' Circle radius.
    ' Draw circle.
    Me.Circle (sngHCtr, sngVCtr), sngRadius
    Me.FillColor = RGB(255, 0, 0) ' Color pie slice red.
    Me.FillStyle = 0 ' Fill pie slice.
    End Sub

    Job done.

    Kind regards
    Mort . . . .

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-11-2016, 07:02 PM
  2. Last page with Page Header print only
    By love2waltz in forum Reports
    Replies: 1
    Last Post: 06-06-2014, 10:57 AM
  3. print the first page only
    By markjkubicki in forum Reports
    Replies: 6
    Last Post: 03-28-2013, 03:33 PM
  4. Replies: 3
    Last Post: 08-07-2011, 09:22 PM
  5. Replies: 3
    Last Post: 12-02-2010, 12:23 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums