Results 1 to 10 of 10
  1. #1
    Star Lounger
    Join Date
    May 2001
    Location
    New Jersey, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Apply Filter (2.0)

    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.
    <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23>
    Could someone please help.

    Thanks,
    MArk

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Apply Filter (2.0)

    References perhaps?
    Pat <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

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

    Re: Apply Filter (2.0)

    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. <img src=/S/confused.gif border=0 alt=confused width=15 height=20>
    Charlotte

  4. #4
    Star Lounger
    Join Date
    May 2001
    Location
    New Jersey, USA
    Posts
    55
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Apply Filter (2.0)

    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

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

    Re: Apply Filter (2.0)

    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.
    Attached Files Attached Files

  6. #6
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Apply Filter (2.0)

    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
    Louise

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

    Re: Apply Filter (2.0)

    Hi Louise,

    You should start by creating an option group <IMG SRC=http://office.microsoft.com/global/images/default.aspx?AssetID=ZA060445281033> with toggle buttons. The easiest way to create one is using the wizard - make sure that the Control Wizards button <IMG SRC=http://office.microsoft.com/global/images/default.aspx?AssetID=ZA060472371033> 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.

  8. #8
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Apply Filter (2.0)

    Thank you Hans for the direction. I'll give it a try! <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Louise

  9. #9
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Apply Filter (2.0)

    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
    Louise

  10. #10
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    Florida, USA
    Posts
    394
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Apply Filter (2.0)

    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!
    Louise

Posting Permissions

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