Results 1 to 7 of 7
  1. #1
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171

    Criteria option not appearing when creating report

    I created a query and set criteria in one field to ask for a last name. When I run the query it does just that. Thereafter, I attempted to create a report from the query which I had done successfully in the past. However, when I then click on report it does not ask for a last name but produces a report on all 600 names in my database. I have done this with setting criteria in the past and it has worked but now I must be missing something. Any ideas? My criteria is Like"*"& [Enter Last Name]&"*"



    I set it up this way so they could enter only part of the last name if necessary. Like I say, it worked previously but now it is not.

    Thanks in advance.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Strange, even in a report the parameter should ask the user.
    you are SURE the report is connected to the param query?

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,819
    I NEVER use dynamic parameterized queries. I prefer to have user input parameter on form and then define the criteria in the OpenReport (or OpenForm) command using the WHERE argument.
    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.

  4. #4
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    Well...I thought I was sure but let me explain step by step what I did. I went to Create and Query Design. I opened my database and then began adding fields to create my query. In the Name field I set the parameter mentioned. When I ran the query, it asked me to enter the name which I did. I saved the query. When the results appeared, I then went to Create and Report Design. I entered just the Name filed in the design to see if it would run correctly. I saved the report, then clicked on it but no request for a name was made. Since I was creating the report based upon the query results I thought it would demand the parameter. I think I may have noticed one difference from my prior experiences.

    Before, when I ran the query and went to create a form I would always get a message saying I had to save the query before I could make form/report. While I did save it this time, I did not get any such message when I went to design a report before saving.

  5. #5
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    Quote Originally Posted by June7 View Post
    I NEVER use dynamic parameterized queries. I prefer to have user input parameter on form and then define the criteria in the OpenReport (or OpenForm) command using the WHERE argument.
    Wish I was competent enough to understand this!

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,819
    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.

  7. #7
    PATRICKPBME is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Posts
    171
    Just wanted to let you know I got it working although I don't understand why. What I did this time after creating the query was to design a form using the form wizard instead of form design. Thereafter saved it as a form and a report and I got the result I needed namely; when I click on either the form or report it asks that I first enter the name. Not sure why I couldn't get the same result in design mode, but maybe that will give someone clue as to what I was missing or doing wrong.

    Thanks for all of the assistance.

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

Similar Threads

  1. Replies: 41
    Last Post: 12-06-2016, 08:40 AM
  2. Replies: 1
    Last Post: 10-12-2016, 02:20 PM
  3. Replies: 1
    Last Post: 12-07-2014, 02:04 PM
  4. option groups as criteria for a report
    By cfljanet in forum Access
    Replies: 10
    Last Post: 10-30-2013, 02:49 PM
  5. Replies: 13
    Last Post: 12-23-2012, 02:09 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