Results 1 to 2 of 2
  1. #1
    Trojnfn is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    46

    Search Form and Report Question

    I have a search form where I select search values from a pulldown and then click the search/command button. It lists all the summary data on single lines with a command button next to each. I then click on that button and it opens a report with all the detail information for that line.

    Two questions :

    1. Everytime I open the search form, all the values are already listed. When I select and search for a particular value, those come up and override what is already displayed on the screen. How can the values not be displayed as soon as the form is opened ? It should be a blank form and only display when I click the search/command button. How do I display a message if no records are found based on the selection ?



    2. When I find and display the summary data that corresponds to the search criteria, I click on the button to open the report to show the detail. However, instead of only showing the information for that one record, it shows all the information for the search. For example, if I select Apples as my search, it will return 5 records. I select the first record only but the report shows the detail for all 5 records, one after another. How do I get it to only display the record that I selected, not all ?

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,600
    A label on form could be set as not visible then if a certain field of the form is null after the search effort, code could make the label visible. The label could be big red text that states NO RECORDS FOUND.

    Is there only one criteria involved in this filtering?

    Review these tutorials that demonstrate use of query parameters to filter data:

    http://datapigtechnologies.com/flash...tomfilter.html

    http://datapigtechnologies.com/flash...mtoreport.html

    The technique is easy and can handle multiple criteria. However, I don't really like query parameters. An alternative to filter report data is WHERE CONDITION argument.

    DoCmd.OpenReport "report name", , , "fieldname=" & Me.combobox
    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.

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

Similar Threads

  1. Replies: 1
    Last Post: 04-20-2012, 03:16 AM
  2. Search Question
    By SPE_NY in forum Forms
    Replies: 3
    Last Post: 03-02-2011, 01:17 PM
  3. Replies: 3
    Last Post: 01-14-2010, 08:32 AM
  4. Replies: 5
    Last Post: 07-26-2009, 12:13 PM
  5. Search Form Results Displayed In Report
    By warrenjburns in forum Forms
    Replies: 1
    Last Post: 03-18-2009, 02:08 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