Results 1 to 4 of 4
  1. #1
    jwill is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Mar 2012
    Location
    MD
    Posts
    67

    Need help w/ docmd.openreport

    I am running this code

    Code:
    Private Sub rpt_criteria_go_btn_Click()
    DoCmd.OpenReport "staff_login_hours", acViewReport, , staff_log_empl_num = Me.rpt_criteria_emp_id
    End Sub
    ...and I can't figure out why the report isn't loading any records. (me.rpt_criteria_emp_id) is a field in a form that I'm using to allow the user to choose the employee that they want to pull the info for, (staff_log_empl_num) is a column in the query that the report is based on but I am getting no records. Can anyone figure this out w/ the info given????



    P.S. there are records that fit the criteria. I opened the report directly and see the records.

  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,518
    See if this helps:

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

  3. #3
    jwill is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Mar 2012
    Location
    MD
    Posts
    67
    Quote Originally Posted by pbaldy View Post
    See if this helps:

    BaldyWeb wherecondition
    Yes it did, forgot the quotes since its a text value. Thanks

  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,518
    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: 7
    Last Post: 12-10-2018, 05:24 PM
  2. DoCmd.OpenReport focus reverts back to form
    By shabbaranks in forum Programming
    Replies: 2
    Last Post: 01-07-2012, 06:18 PM
  3. Replies: 2
    Last Post: 10-13-2011, 09:14 AM
  4. DoCmd OpenReport ... where condition with a Like
    By Grooz13 in forum Programming
    Replies: 4
    Last Post: 08-31-2010, 09:04 AM
  5. Can docmd.openreport print X copies on Y printer?
    By Coolpapabell in forum Reports
    Replies: 1
    Last Post: 09-02-2009, 08:35 AM

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