Results 1 to 4 of 4
  1. #1
    faythe1215 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    52

    Search Form - Dialog box asks for search criteria

    Currently working on a search form. I started by following the instructions outlined in this post:



    https://www.accessforums.net/access/...7-a-26373.html

    The form used for the search is a subform. The main form contains a button that makes the search subform visible. When I try to open the main form, a dialog box appears asking for the search criteria. I was under the impression that placing default values in my text boxes (in the search form) would keep this from happening.

  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,770
    That tutorial does not involve form/subform arrangement.

    Be aware that subform loads before the main form - yes, sounds weird but that's the way it is.

    So if dynamic parameter query is the subform RecordSource and the input controls are on main form, the controls are not available for reference, and therefore the popups.

    If the inputs are in the subform (Continuous View?) then referencing the controls by the query is more complex. Post the query SQL statement.

    Why form/subform arrangement? Is the main form bound to data?
    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
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Fay,

    Suggest you tell us WHAT you are trying to accomplish in plain English. Then readers can offer suggestions/options.

  4. #4
    faythe1215 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    52
    Quote Originally Posted by June7 View Post
    That tutorial does not involve form/subform arrangement.

    Be aware that subform loads before the main form - yes, sounds weird but that's the way it is.

    So if dynamic parameter query is the subform RecordSource and the input controls are on main form, the controls are not available for reference, and therefore the popups.

    If the inputs are in the subform (Continuous View?) then referencing the controls by the query is more complex. Post the query SQL statement.

    Why form/subform arrangement? Is the main form bound to data?
    My search form is actually a simple form (to be used as a subform) with two fields. One for the Recipe Name and one for the Ingredients. I have the values defaulted as "".

    My SQL statement looks like this in both fields with the respective field name changed:
    Like "*" & [Forms]![frmRecipeEditSearch]![txtRecipeName] & "*"

    Quote Originally Posted by orange View Post
    Fay,

    Suggest you tell us WHAT you are trying to accomplish in plain English. Then readers can offer suggestions/options.
    Sorry, I didn't realize that my original post was convoluted. I'll try again

    The whole of what I am trying to do:

    This is actually part of my Main Switchboard which I currently have tabbed. On the Recipes tab, I have a series of buttons that allow the user to
    • Add A New Recipe
      When clicked, this button opens a new form that allows the user to add a recipe (I'm pretty sure I've got this one finished)
    • Edit An Existing Recipe
      When clicked, this button displays the subform frmRecipeEditSearch which has two fields (txtRecipeName and txtIngredient), a button that resets the fields (sets them to "") and a button that runs a query and them displays those results in a form.
      Code:
          DoCmd.OpenQuery "qryRecipeLink_Complete_Search"
          DoCmd.OpenForm "frmRecipeSearchResults"
      When the user selects an item from the form, a new form will open that will allow them to edit the recipe.
    • Search for A Recipe
      This one will run similarly to the above button but when they click on an item from the result form it, the recipe will display as a report rather than as a form. (I haven't even started on this yet)
    • Display a Complete List of All the Recipes
      When clicked, this report of all the recipes stored by type (I'm pretty sure I got this one too, but I still have to test it a bit)


    This project is much bigger than even this, but this is where I am right now. I hope this was more clear.

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

Similar Threads

  1. Replies: 3
    Last Post: 01-04-2015, 06:09 PM
  2. Replies: 7
    Last Post: 07-04-2014, 10:35 AM
  3. Search form criteria
    By atom in forum Forms
    Replies: 3
    Last Post: 04-03-2012, 06:42 AM
  4. Search for associated folders in file dialog box
    By john_billau in forum Programming
    Replies: 1
    Last Post: 01-27-2012, 03:48 PM
  5. search criteria in a form fails!
    By maxbre in forum Programming
    Replies: 2
    Last Post: 12-01-2010, 06:21 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