How to stop queries from displaying results

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kent christensen
    New Member
    • Sep 2010
    • 33

    How to stop queries from displaying results

    So i have all my queries displaying results in my form. I was wondering how i can stop the queries from popping up when i run them via a button on the form?
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    What do you need the queries for? What are you trying to accomplish.

    Please explain some more, cause your question makes little sense with no context supplied.

    Comment

    • kent christensen
      New Member
      • Sep 2010
      • 33

      #3
      I basically have a query that compares a customers list to a product list that is in the access database. Then a couple other queries take the matching parts and lists the prices of the products as well as other details. Then more queries to provide a sum total and figure out tax ect...ect....

      So i have it so the total value displays on the form, however everytime i run the query, the query results pop up and also displays on the form. I want the results to display on the form only and not pop up. Essentially i am done with the database and wish for the user to only work on the form and not have any results pop up in different widnows.

      Let me know if this makes sense. Sorry if i was unclear before.

      Comment

      • TheSmileyCoder
        Recognized Expert Moderator Top Contributor
        • Dec 2009
        • 2322

        #4
        How do you run the queries? Are you using VB code or macros? I believe that your not running your queries in the proper way, since they are "popping up".

        Comment

        • gershwyn
          New Member
          • Feb 2010
          • 122

          #5
          Without seeing the code, I'm only guessing, but it sounds to me like you are trying to run a select query from VBA or a macro. These do not need to be "run" - any queries based on them will pull the data as needed on demand. If you have an OpenQuery macro action (or equivalent VBA code) for these queries, you can simply remove them.

          The only queries that need to be "run" are action queries - those that create tables or update, append, or delete data to existing tables.

          Comment

          • colintis
            Contributor
            • Mar 2010
            • 255

            #6
            From my guessing, kent may required the output to be display within the form, which is the subform. As if you just run the select query, it will pops the query result window because there's nowhere in the form it can show the query result.

            So this part you'll need to create a subform and a query, set the name of the query into the record source of the subform.

            Comment

            • NeoPa
              Recognized Expert Moderator MVP
              • Oct 2006
              • 32662

              #7
              Kent, Clearly your ability to explain the situation is limited. How about you post the code you referred to in the first post that's behind the command button on the form. Maybe we can work out what you're trying to say from reading that.

              Comment

              • kent christensen
                New Member
                • Sep 2010
                • 33

                #8
                got it thanks.

                Comment

                Working...