• Apply Filter (2.0)

    Author
    Topic
    #378105

    I am trying to use/copy the Northwind suppliers form for my company and for some reason, I cannot get the ApplyFilter macro thing to work .
    I must be missing something quite simple, but I can’t figure it out.
    hairout
    Could someone please help.

    Thanks,
    MArk

    Viewing 1 reply thread
    Author
    Replies
    • #624910

      References perhaps?
      Pat smile

    • #624951

      What version does 2.0 refer to? Access, Windows or Office service pack, or what? Or did you mean 2000? And what ApplyFilter macro thingy are you referring to? There’s no such animal in my Northwind database for A2k. confused

      • #625027

        Its Access 2.0
        I checked Access 2000 and the suppliers form has changed.

        In the Access 2.0 Northwind database, the suppliers form has the supplier (name, address, phone, fax) info in the detail and in the form footer it has a option group with toggles/buttons for each letter of the alphabet (and an “all”). Hitting a button filters the suppliers by the letter pressed.

        Just thought it was a nice feature and wanted to add it our to our customers and suppliers form.
        I’m having trouble getting the buttons to work properly.
        I copied the form and the macro over and tried to convert it my needs, but I can’t get it to work right.

        Thanks,
        Mark

        • #625032

          Here is an example in Access 97 of such a form, based on the Customers table from the NorthWind database. Clicking a toggle button is handled by VBA code in the AfterUpdate event of the option group instead of a macro.

          • #1058454

            Hi Hans,
            I want to do the same thing with one of my Customer forms. I found this post and tried looking for the “AfterUpdate” event in the properties but was not successful. I saw where there was an “AfterUpdate” in VB.

            Do I just copy this to my database and then change the names etc? Do I create the toggle buttons first? before doing this?

            This is my first attempt at Toggle Buttons, so totally unfamilar with it. I like the idea of what was done in the Northwind database and would like to try doing that as well.

            Thanks

            • #1058456

              Hi Louise,

              You should start by creating an option group with toggle buttons. The easiest way to create one is using the wizard – make sure that the Control Wizards button is on (down).
              When the option group has been created, you can tweak its layout and create an After Update event procedure. Each toggle button in the option group has a unique Option Value; when a toggle button is clicked, its Option Value becomes the Value of the option group.

              See Create an option group for more info.

            • #1058466

              Thank you Hans for the direction. I’ll give it a try! cheers

            • #1058636

              Apparently there’s something I don’t know to do. I created an Option Group (I think) using the wizard, but I didn’t know how to answer the wizard.

              I created a new database called “Practice” and imported the Table and Form from the Customers.mdb that you had attached previously. Then I created the Option Group using the Option Group Tool.

              Using the Wizard:
              1. Label Names? I use just one, right? I noticed that the most you can have is 20. The alphabet including “all” is 27.
              2. Default choice? I assumed yes since there was only one?
              3. Values? 27 since I’ll need 27 toggles?
              4 Store in field? If yes, which one? Do I answer yes to this?

              Once the “frame” was create and the toggle was inside, what do I do? I changed the toggle to “A” and then put another goggle inside the frame and called it “B”. They don’t do anything of course. Where do I enter the “AfterUpdate”? Do I copy the original from VB somewhere?

              Sorry to ask so many questions but not having done this before, I don’t know what to do and in what order to do it. I read the help but it was too vague for me to follow.

              Thank you

            • #1058650

              Hi Hans,
              I think I figured it out. I studied the original database’s properties and code and compared it to what my “practice” database had.

              I found the “After Update” in the Option Group properties and I copied the code from the original database and it worked. It continued to work after I added more toggles [more letters].

              I know that this is probably not the correct way to do it and hopefully will not run into any problems later on.

              Thanks!

    Viewing 1 reply thread
    Reply To: Apply Filter (2.0)

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

    Your information: