Results 1 to 3 of 3
  1. #1
    Knaabis is offline Novice
    Windows XP Access 2002
    Join Date
    Jun 2011
    Posts
    3

    Query with multiple parameters

    I need to run the query with the form, where the query criteria are the values ​​of subforms.
    For example - [Forms]! [Cutting_List]! [Cutting_List_Details subform]! [Order_No]
    The query works, but only the first entry (criteria) in subform ...
    How to "get" request for use of all relevant records in the subform?


    For example - [Forms]! [Cutting_List]! [Cutting_List_Details subform]! [Order_No]=10, 15, 25

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    well first let's correct the syntax:
    [Forms]![Cutting_List].[Cutting_List_Details subform].Form![Order_No]

    but if I understand your post correctly, and I'm not sure I do, but - you have a subform that is in continuous form mode so you have multiple records - in which case calling the value as proposed above is not going to work regardless of the syntax...

    so what you need to do is approach it differently; that subform is a record set - - you need to establish that same record set - -so write a new query that returns the exact same records as your subform. Then use this query record set joined into a new query that has your data.... at this point I can't give you an exact guide as I don't know whether you are needed to do calculations or what....but this is the general idea.

    Hope it helps.

  3. #3
    Knaabis is offline Novice
    Windows XP Access 2002
    Join Date
    Jun 2011
    Posts
    3
    Forms>subform records is the criterion for Query.
    If in subform is only one entry, then Query looks good, but if in Subform are many entries, then Query returns result only by first subform entry.
    I need to Query be run from Form and use the subform records for Query filter.

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

Similar Threads

  1. Multiple parameters collected in a query
    By Joe Heiser in forum Queries
    Replies: 4
    Last Post: 02-16-2011, 04:29 PM
  2. Multiple Choices for Parameters with VBA and Queries
    By weasel7711 in forum Programming
    Replies: 3
    Last Post: 02-02-2011, 09:19 AM
  3. Msgbox in a query with parameters
    By seb in forum Forms
    Replies: 7
    Last Post: 07-06-2010, 05:07 AM
  4. Replies: 3
    Last Post: 07-01-2010, 07:55 PM
  5. Add query parameters in with vbCode?
    By ~SwAmPdOnKeY~ in forum Programming
    Replies: 0
    Last Post: 08-07-2008, 07:58 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