Results 1 to 2 of 2
  1. #1
    tylerg11 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    200

    Dynamic Query Critiera: Form Name


    I have syntax similar to the following as criteria for one of my query fields:

    Code:
    [Forms]![myForm]![myControl]
    I want to use this query on multiple forms, so can I make this syntax dynamic? Instead of [Forms]![myForm], can I insert a variable that will automatically insert the form name? For example: [Me.Form]![formControl].

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    In a word, no. You might find this an option:

    http://www.baldyweb.com/wherecondition.htm

    after taking the criteria out of the query.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 12-15-2011, 04:26 AM
  2. Dynamic Form, Dynamic labels/ captions?
    By JFo in forum Programming
    Replies: 15
    Last Post: 10-12-2011, 08:33 PM
  3. Replies: 1
    Last Post: 07-30-2010, 10:28 AM
  4. Dynamic Query
    By pushpm in forum Queries
    Replies: 0
    Last Post: 04-22-2009, 12:58 PM
  5. Dynamic SQL Query
    By Squeaner in forum Queries
    Replies: 0
    Last Post: 09-25-2008, 02:37 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