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

    DoCmd WHERE Clause not filtering form

    The WHERE clause specified in my DoCmd code is not filtering the form when it opens. No errors, but in order to apply the filter I have to hit the filter button. It doesn't filter automatically. I don't want the form to filter on load...just when it opens with this code. What am I missing?



    Code:
    DoCmd.OpenForm "frmQuote", acNormal, , "QuoteNumber = " & Me.QuoteNumber

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,062
    Try another comma (,)


    DoCmd.OpenForm "frmQuote", acNormal,,, "QuoteNumber = " & Me.QuoteNumber

  3. #3
    tylerg11 is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Sep 2011
    Posts
    200
    Thanks. I don't think that was the problem. I think it was some stay code that was keeping it from filtering.

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,062

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

Similar Threads

  1. DoCmd.OpenReport focus reverts back to form
    By shabbaranks in forum Programming
    Replies: 2
    Last Post: 01-07-2012, 06:18 PM
  2. Replies: 6
    Last Post: 11-17-2011, 10:50 PM
  3. Help on where clause of open form
    By Madmax in forum Access
    Replies: 5
    Last Post: 06-23-2011, 11:19 AM
  4. Docmd.form cause reference error
    By snoopy2003 in forum Programming
    Replies: 0
    Last Post: 03-10-2011, 10:49 AM
  5. Select / DoCmd to open another form
    By chrisjack001 in forum Access
    Replies: 1
    Last Post: 08-24-2010, 12:31 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