Results 1 to 2 of 2
  1. #1
    dbalilti is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53

    Creating Form that Calls on Query

    Hey guys,



    So I am trying to create a form that will call a query of mine up.

    The catch is , the query requires me to input a range and then it filters the databse that way.

    So i want to make a form that allows me to insert the range then press a button and opens up the query in a subforum.

    Can anyone lead me in the right direction??

    thankyou

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    The easiest way is use a form to input the query criteria, then in include the criteria in a docmd.openform statement, for example:

    DoCmd.OpenForm "frmCustomer_Orders", , , "Customer_ID = " & Me!customerID

    The bold text is just like a WHERE clause but without the WHERE.

    How do want to use the query data that will be in the form? It is just for viewing, and does it require a response of some sort? If so, you may want to make the query result form MODAL so that you cannot continue until you close it, but that depends on what you need to do.

    What I have shown you is not for a subform - you can still do what you want with a subform, but in a different way.

    HTH

    John

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

Similar Threads

  1. SQL SERVER ADO Calls.
    By majero in forum SQL Server
    Replies: 3
    Last Post: 05-28-2015, 12:07 PM
  2. Replies: 1
    Last Post: 03-01-2012, 09:06 AM
  3. Help with Form & Report that calls a Query
    By bobfin in forum Reports
    Replies: 7
    Last Post: 08-14-2010, 12:05 PM
  4. function calls in a report?
    By kvon in forum Reports
    Replies: 11
    Last Post: 04-25-2010, 08:51 AM
  5. Follow up calls, put in automatic date
    By Loish in forum Access
    Replies: 1
    Last Post: 04-08-2010, 03:59 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