• Filtering a Subform (Access 2000)

    Author
    Topic
    #421069

    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.

    Viewing 0 reply threads
    Author
    Replies
    • #955493

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

      • #955541

        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.

        • #955543

          I don’t see an attachment…

          • #955570

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

            • #955587

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

            • #955603

              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. clapping
              Theresa

            • #955610

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

            • #955618

              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!

    Viewing 0 reply threads
    Reply To: Filtering a Subform (Access 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: