Results 1 to 8 of 8
  1. #1
    Holli is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    46

    Users Printing Individual Report From Data Entry Form Submit Button (Testing)

    Hi June 7

    I wasn't able to try the code until today. Having some trouble it prints all of the reports. Should I retrieve the record then print?

    RunCommand acCmdSaveRecord
    If MsgBox("Would you like to print your report?", vbYesNo) = vbYes Then
    DoCmd.OpenReport "CAREER PATH ASSESSMENT EMPLOYEE REPORT", "EmployeeID" = Me.EmployeeID
    MsgBox "Thank you for your participation. Please complete your Department Survey and any Department Survey you may have a skill set in."
    Me.Requery
    DoCmd.Close
    End If

    End Sub

    Thanks



    Holli

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    You have it in the wrong position. Look at help on OpenReport; you want this bit:

    "EmployeeID" = Me.EmployeeID

    in the wherecondition argument.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Holli is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    46

    Users Printing Indivdual Report From Data Entry Form Submit Button (Testing)

    Thanks Paul

    I made the changes to the code. Printing one page but it is blank. Only the report text prints not the user's answers. I can see the individual report in (Reports) but I can not pull it to print.

    RunCommand acCmdSaveRecord
    If MsgBox("Would you like to print your report?", vbYesNo) = vbYes Then
    DoCmd.OpenReport "CAREER PATH ASSESSMENT EMPLOYEE REPORT", acViewNormal, , "EmployeeID" = "Me.EmployeeID"
    MsgBox "Thank you for your participation. Please complete your Department Survey and any Department Survey you may have a skill set in."
    Me.Requery
    DoCmd.Close
    End If

    End Sub

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    You changed the wherecondition (and I just noticed it wasn't right anyway). Try

    DoCmd.OpenReport "CAREER PATH ASSESSMENT EMPLOYEE REPORT", acViewNormal, , "EmployeeID = " & Me.EmployeeID

    More info here:

    BaldyWeb wherecondition
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Holli is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    46
    Great !!! Thanks Paul

    Just one more question . Now I am printing multiple reports pages (4 or 9) but the printer status is total pages printed 1.

    Any thoughts?

    Again thanks so much

    Holli

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    If a single report is 4-9 pages long, not sure why it would do that. If you're looping through and printing 4-9 1-page reports, that's would I would expect.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Holli is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    46
    No just a one page report, but now it is showing duplicate entries for the same person in the report view and printing duplicate copies of same report.

    Again thanks a lot, you saved me

    Holli

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 5
    Last Post: 01-09-2015, 03:58 PM
  2. Replies: 3
    Last Post: 12-29-2014, 01:04 PM
  3. Replies: 4
    Last Post: 09-07-2014, 11:41 AM
  4. Replies: 1
    Last Post: 05-12-2012, 11:38 AM
  5. Submit Button In Form
    By smarty84handsome in forum Forms
    Replies: 3
    Last Post: 01-12-2012, 11:17 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