Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Apr 2002
    Location
    Bloomsburg, Pennsylvania
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Applyfilter - subform (Access 2003)

    I have a form with a subform and I'm trying to apply a filter on the subform. I have a button on the subform that uses this code when clicked:

    DoCmd.ApplyFilter , "[deleteit] = 0" (just trying to filter out records they have marked for deletion)

    This button works fine when I run the form that is used as the subform by itself, but when I try to run the main form and click on this filter button, I get the dreaded "Enter Parameter Value" window, and if I say "OK", the whole screen goes blank.

    Not sure where to go with this one. Any suggestions would be greatly appreciated.

    Thanks in advance.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Applyfilter - subform (Access 2003)

    Try replacing the line with

    Me.Filter = "[deleteit] = 0"
    Me.FilterOn = True

    Me refers to the form (or report) containing the code, i.e. the subform, so there can be no confusion.

  3. #3
    Lounger
    Join Date
    Apr 2002
    Location
    Bloomsburg, Pennsylvania
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Applyfilter - subform (Access 2003)

    Thank you! That worked great!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •