Results 1 to 2 of 2
  1. #1
    MiaAccess is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Mar 2011
    Location
    Texas
    Posts
    31

    Saving report as PDF with text fields jobno and week ending date.

    Every week I have to print this particular report for job costs, individually for each job. I am tired of having to type the job number and name and the weekending date.

    I have used this routine and it works if I set my own title. Here is the code

    Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
    If Me.Page = 1 Then ' no need to do it more than once


    Me.Caption = "PostingSum" & Forms!frmRptAnyWeekbyJob2!txtWeDate" '''''PostingSum is just a name I am giving the report. TXTWeDate is a text field created to format the date with dashes.
    End If
    End Sub

    Now it created a textbox for the job number and Name which is selected from a combo from the below listed form

    Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
    If Me.Page = 1 Then ' no need to do it more than once
    Me.Caption = Forms!frmRptAnyWeekbyJob2!txtJobNoName" - " & Forms!frmRptAnyWeekbyJob2!txtWeDate"
    End If
    End Sub

    I need to know in which format I have to code the JobnoName for it to work

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    49,480
    Looks like missing & and extra quote mark at end.

    Me.Caption = Forms!frmRptAnyWeekbyJob2!txtJobNoName & " - " & Forms!frmRptAnyWeekbyJob2!txtWeDate
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 3
    Last Post: 10-19-2014, 06:33 PM
  2. Saving report IDs to a text file
    By Ruegen in forum Programming
    Replies: 3
    Last Post: 12-16-2013, 09:19 AM
  3. Start a report on week 40 of a week count
    By aspitalnick in forum Reports
    Replies: 8
    Last Post: 11-28-2012, 04:53 PM
  4. Replies: 3
    Last Post: 04-01-2012, 01:40 PM
  5. Date Range Report with Multiple Date Fields
    By StevenCV in forum Reports
    Replies: 13
    Last Post: 02-29-2012, 08:29 AM

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 - Senior Forums