Results 1 to 2 of 2
  1. #1
    ariansman is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    57

    Can we make this criteria in a query?

    We make a criteria in a query to get data from form1 like: [forms]![form1]![text1]. This requires us to have the Form1 open and there should be a data in Text1.


    Can we make the criteria to either take the data from Form1 like the above, or if Form1 is not open it gets data for the criteria from another form like : [forms]![form2]![text2].
    Last edited by June7; 12-15-2014 at 12:13 AM.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Not with parameters in query. Need to use code to build filter criteria and apply it to the form when opening. Use the WHERE CONDITION argument of OpenForm method. This can be done in macro or VBA.
    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.

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

Similar Threads

  1. Replies: 4
    Last Post: 08-30-2014, 10:23 AM
  2. How to make a query ask for criteria?
    By hesca in forum Queries
    Replies: 1
    Last Post: 10-04-2012, 10:10 AM
  3. Replies: 5
    Last Post: 08-02-2012, 09:44 AM
  4. Make query print YES or NO for certain Criteria
    By taimysho0 in forum Queries
    Replies: 3
    Last Post: 12-12-2011, 01:33 PM
  5. Replies: 1
    Last Post: 07-13-2011, 11:00 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