Results 1 to 3 of 3
  1. #1
    romebrown is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    2

    Question Printing report crashes access

    Hi!

    I have a form that once filled in, I have included a print button that filters the form for the current record and produces a report in print preview. This print preview always works, but when the user clicks the "print" button on the ribbon--about 1/2 the time, access crashes. Access has to be reopened and the report located to print again (embarrassing in front of customers waiting on their invoice). Any ideas?

    Private Sub Print_Click()
    Dim strWhere As String
    If Me.Dirty Then 'Save any edits.
    Me.Dirty = False
    End If
    If Me.NewRecord Then 'Check there is a record to print
    MsgBox "Select a record to print"
    Else
    strWhere = "[Transaction Number] = " & Me.[Transaction Number]


    DoCmd.OpenReport "Rental Receipt", acViewPreview, , strWhere
    End If
    End Sub

    Thanks for your help!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Don't know, never had that happen. Do you really need to preview the report? Why not just straight to printer?

    Can you provide project for analysis?
    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.

  3. #3
    romebrown is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Posts
    2

    Smile Thanks for your help.

    Changed the acViewPreview to acViewNormal and this appears to have solved it. Sometimes just requires a fresh brain to come up with a fresh idea. Thanks so much!

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

Similar Threads

  1. Access crashes when editing VBA
    By Tingholm in forum Programming
    Replies: 5
    Last Post: 01-16-2013, 01:29 AM
  2. SQL crashes access
    By max in forum Programming
    Replies: 10
    Last Post: 01-11-2012, 03:44 AM
  3. VBA Crashes Access
    By ChuckColeman1812 in forum Programming
    Replies: 5
    Last Post: 12-12-2011, 03:33 AM
  4. Access freezes up and crashes
    By CompTechRx in forum Access
    Replies: 5
    Last Post: 11-01-2011, 02:53 PM
  5. Opening Report Crashes Access 2003
    By GT3000 in forum Reports
    Replies: 1
    Last Post: 05-09-2011, 11:21 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