Results 1 to 9 of 9
  1. #1
    Star Lounger
    Join Date
    Oct 2003
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Filtering a Subform (Access 2000)

    I need to filter and unfilter my subform multiple times but I want it to stay with the same record while I do it. Can anyone give me a code for this? I've tried using a parameter qry which prompts for the record id that I want it to stay on but I can see where the user would easily tire of entering the record id with every filter and I run the risk of a typo with this method.

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

    Re: Filtering a Subform (Access 2000)

    What if the filter is such that the current record in the subform is excluded from the filter?

  3. #3
    Star Lounger
    Join Date
    Oct 2003
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filtering a Subform (Access 2000)

    Thank you for replying Hans. You helped me with the first part of this challenge a couple of weeks ago.

    The record should not be excluded but there's a lot to trouble shoot with this stuff isn't there! I'm open to any advise that you can offer! I just finished my class on Access and we touched on coding but I know just enough to know that I need to know more.

    What I want to filter on is the type of equipment that is available in the date range selected. I've put a combo box on the form so the user can select the type of equipment needed and I'm hoping to filter and unfilter the equipment that is available in the selected date range from there. You were kind enough to give me the queries that figured out which equipment to exclude and which equipment is available in the date ranges selected. I hate to keep asking for help but I just can't get past this part of the database.

    I've attached the sample database. I don't remember whether or not I locked the fields in the Equip that is available subform. If not, I'll be sure and do that in the final project.

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

    Re: Filtering a Subform (Access 2000)

    I don't see an attachment...

  5. #5
    Star Lounger
    Join Date
    Oct 2003
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filtering a Subform (Access 2000)

    The sample that I have was at work. Hopefully it will work this time.

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

    Re: Filtering a Subform (Access 2000)

    Does the attached version do what you want? I added an After Update event for the combo box.

  7. #7
    Star Lounger
    Join Date
    Oct 2003
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filtering a Subform (Access 2000)

    That is SO great! That coding sure gives you a lot of control. I would have never gotten that.

    I don't mean to keep bothering you but can you please tell me what the & Chr(34) means. I realize that it's holding the record somehow but I'd like to understand it if you can explain it in simple terms.

    I can't thank you enough. I may actually get this project done sometime this summer. <img src=/S/clapping.gif border=0 alt=clapping width=19 height=23>
    Theresa

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Filtering a Subform (Access 2000)

    Chr(34) is the double quote. It is used to surround and delimit a string value.
    Charlotte

  9. #9
    Star Lounger
    Join Date
    Oct 2003
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filtering a Subform (Access 2000)

    Thank you Charlotte. I'll have to look all of that up as I'm just starting out but it does give me a lot of terminology to do a search on.

    Thanks again!

Posting Permissions

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