Results 1 to 2 of 2
  1. #1
    Access_Novice is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Sep 2013
    Posts
    265

    DoCmd.OpenForm; 3rd Argument = FilterName

    If you use DoCmd.OpenForm, the 3rd argument is "FilterName." How do you use this argument? I can't find examples. Various websites say that you state the name of a query. But does that mean you are using that specified query as a new Record Source, replacing the existing Record Source of the form that was opened?

  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,815
    Never figured out how to use and therefore I've never used that argument. The 4th argument (WHERE CONDITION) has met all my requirements.

    However, just did a little test. I removed the RecordSource from a report and created a query object with the SQL. Then I opened the report using reference to the query object in the FilterName property. The report opened but there was no RecordSource associated and all the textboxes showed #ERROR or #NAME?.

    Then I restored the RecordSource in the report. Applied a filter criteria in the saved query object. When I opened the report it was filtered according to the criteria in the query object.

    Does that help you with understanding? Just reaffirms to me I should continue avoiding it.
    Last edited by June7; 02-03-2014 at 02:58 AM.
    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. Slow Opening Form using DoCmd.OpenForm
    By timfoster in forum Forms
    Replies: 12
    Last Post: 02-01-2014, 04:00 AM
  2. Replies: 1
    Last Post: 11-25-2013, 09:47 PM
  3. DoCmd.OpenForm Syntax Error
    By alsoto in forum Forms
    Replies: 3
    Last Post: 02-29-2012, 01:14 PM
  4. What actually happens at docmd.openform
    By Beorn in forum Programming
    Replies: 4
    Last Post: 01-05-2011, 02:19 PM
  5. DoCmd.OpenForm Modification
    By alsoto in forum Forms
    Replies: 6
    Last Post: 05-01-2009, 07:28 AM

Tags for this Thread

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