Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2013

    Unanswered: Print fiiltered form records

    I have an Access 2007 form that uses a parameter query, that when the user opens the form from the main menu, it asks that you enter the portfolio managers name (should be their own name), so they can only view and edit their own forms. I have added a button with ON CLICK event procedure so they can print the current form being viewed. The event opens a report using the following code (found on the net):

    Private Sub cmdPrint_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"
    strWhere = "[LoanNumber] = """ & Me.[LoanNumber] & """"
    DoCmd.OpenReport "r_CI_LoanRecords", , , strWhere
    End If
    End Sub

    So far, it works the way I want it to.

    Now I want to add another button to print the same report but print ALL the records that were returned when opening the form (from the original parameter query stated above).

    I have tried a multitude of various options that I have found on the internet and not having any luck.

    I also found a similar post on this forum from Sept 25, 2002, but couldn't quite follow the code that was provided as the solution (very little experience writing code).

    Any help is much appreciated.

  2. #2
    Join Date
    Sep 2013
    Never Mind, not that anyone offered any assistance.

Posting Permissions

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