Results 1 to 6 of 6
  1. #1
    Thermalmonster is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    18

    Printing from inside navigation form

    I have a form which I want to print the current Record
    I have used the add button/ print record / from the Design wizard menu. This works great from inside the raw form.
    When I try and do it from the navigation page it consistantly only prints the first record not the current record
    any ideas?

    Cheers

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Review https://www.accessforums.net/forms/t...orm-32053.html

    Are you actually trying to open and print a filtered report?
    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
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    528
    Simply add a command button to the viewing form and then the user can click the button on the form instead of using the built-in printing options. Most likely, you'll inhibit those options anyway. This method has one requirement: The table must include a field that contains a unique value for each record. A single-field primary key or an AutoNumber field will do nicely.


    Private Sub cmdPrint_Click()
    'Print current record
    'using rptEmployees.
    If IsNull(Me!EmployeeID) Then
    MsgBox "Please select a valid record", _
    vbOKOnly, "Error"
    Exit Sub
    End If
    DoCmd.OpenReport "rptEmployees", , , _
    "EmployeeID = ' " & Me!EmployeeID & " ' "
    End Sub

  4. #4
    Thermalmonster is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    18
    Just print all of the current form

  5. #5
    azhar2006's Avatar
    azhar2006 is offline Expert
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Posts
    528
    Private Sub cmdPrintPreview_Click()
    Dim strReportName As String
    Dim strCriteria As String
    If NewRecord Then
    MsgBox "bbbbbbbbbbbbb." _
    , vbInformation, "nnnnnnnnnnnn"
    Exit Sub
    Else
    strReportName = "RptInvoice"
    strCriteria = "[OrderDateID]= " & Me![OrderDateID]
    'strCriteria = "[lngSalespersonID]='" & Me![lngSalespersonID] & "'"
    DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
    End If
    End Sub

  6. #6
    Thermalmonster is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    18
    THanks for your time and efforts much appreciated

    Works great

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

Similar Threads

  1. Printing a Form from a Navigation Form
    By GordonT in forum Access
    Replies: 3
    Last Post: 07-01-2013, 08:17 AM
  2. Help with Form navigation and printing
    By Ak619mcc in forum Access
    Replies: 1
    Last Post: 03-25-2013, 02:22 PM
  3. Replies: 4
    Last Post: 10-08-2012, 05:33 PM
  4. Replies: 1
    Last Post: 09-05-2012, 07:04 AM
  5. Printing a report in a navigation form
    By DanKoz in forum Forms
    Replies: 2
    Last Post: 08-29-2011, 12:11 PM

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