Results 1 to 4 of 4
  1. #1
    DatabaseIntern is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    20

    Incorrect Subtotal after Export to Word

    Hello, I am fairly new to the export process and noticed that when I export my reports to word the subtotal for each section is wrong. Seemingly the first one will be correct, but after that it gets "Stuck" on that total and prints it every time. Other than that the export works fine, has anyone had this problem/found a solution? Any help would be appreciatted. I am using this line of code:

    Code:
    DoCmd.OutputTo acOutputReportMe.nameacFormatRTF 


    Thanks in advance!

  2. #2
    help_me_with_access is offline help_me_with_excel
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    262
    what is me.name? a rpt? a frm?

    does it show like that to you in access when you look at the screen?

    it might not be fixable. you can't customize access's exporting process. it is what it is.

  3. #3
    DatabaseIntern is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    20
    Yeah, its on a report, so me.name is the name of the report, the rest of the export looks fine, the totals are just off. I was wondering if there were any querks that people knew about that maybe i was falling into.

  4. #4
    DatabaseIntern is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    20
    Hey Guys, I figured out a way around this bug, I imagine this is not a common problem since mose people probably dont put buttons on reports, but if your boss requests it (like in my case) here is a small piece of code I use to to export the report to word without the totals error we had before. This works because something about access counts does not export well unless in preview mode, figuring that out was the real breakthrough.

    Code:
    Private Sub ExportWord_Click()
    On Error GoTo errorHandle
    Dim reportName 
    As String                            'save report name for export proccess
    reportName = Me.name
    DoCmd.OpenReport reportName, acViewPreview       '
    put in preview mode to avoid totalling error
    DoCmd
    .OutputTo acOutputReportreportNameacFormatRTF
    DoCmd
    .OpenReport reportNameacViewReport          'put it back in report mode
    Exit_ExportWord_Click:
        Exit Sub
    errorHandle:
        MsgBox Error$
        Resume Exit_ExportWord_Click:
    End Sub 
    If an administer sees this feel free to mark it as solved

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

Similar Threads

  1. Export report to word document
    By jackyoung2012 in forum Reports
    Replies: 1
    Last Post: 03-16-2012, 11:16 AM
  2. Subtotal Count
    By veritoanimus in forum Queries
    Replies: 3
    Last Post: 12-21-2011, 01:34 PM
  3. Subtotal
    By abc in forum Access
    Replies: 3
    Last Post: 01-31-2011, 04:47 PM
  4. Replies: 7
    Last Post: 08-31-2010, 12:15 PM
  5. Export single records to new Word Document
    By karmaimages in forum Import/Export Data
    Replies: 0
    Last Post: 11-19-2009, 03:37 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