Results 1 to 2 of 2
  1. #1
    rivereridanus is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    71

    ApplyFilter to form on Load error

    I have a form called "frmsurveyviewer" that loads a set of data that has been filtered according to specs on another form called "frmfilterrecordset". A button on frmfilterrecordset opens the frmsurveyviewer, and the following vb code is on on the Load event.



    Code:
    Private Sub Form_Load()
    DoCmd.ApplyFilter "filterviewer", "[day]='" & [Forms]![frmfilterrecordset]![TXTDATE] & "' And [site]=" & [Forms]![frmfilterrecordset]![COMBOLOC] & ""
    End Sub
    It has been working fine for a couple weeks now, and now it gives this error
    Runtime Error 3011: Microsoft Databse Engine could not find object "filterviewer"...

    It's true that there is no "filterviewer", but this has been working fine up until now. It still works on my computer, but now anytime I load the database onto another computer, it doesn't work.

    Why might this be happening?

  2. #2
    rivereridanus is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jun 2011
    Posts
    71
    Nevermind.
    I thought I had to have a name. Turns out I don't. Just use
    DoCmd.ApplyFilter , "where statement"

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

Similar Threads

  1. Run macro on form load?
    By stu_C in forum Forms
    Replies: 3
    Last Post: 08-16-2011, 07:54 AM
  2. Form Load Check
    By Kapelluschsa in forum Forms
    Replies: 3
    Last Post: 07-06-2011, 07:21 AM
  3. On Load, form not visible
    By Bruce in forum Forms
    Replies: 15
    Last Post: 02-24-2010, 04:06 PM
  4. Help with ApplyFilter
    By kabichan in forum Programming
    Replies: 1
    Last Post: 01-15-2010, 09:21 PM
  5. Using ApplyFilter in Form...help please
    By playfuljade in forum Forms
    Replies: 8
    Last Post: 12-19-2005, 09:35 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