Solved

Toggle Buttons to filter in Access

Posted on 2010-09-15
5
595 Views
Last Modified: 2013-11-28
My question has to do with deconstructing an existing Access 2007 form that works quite well. I believe the form at which I'm looking was created using an automated Wizard, but I can't find any Wizard behind the Curtain pulling any strings.  The form has a series of toggle buttons at the bottom of the form, labeled "A" through "Z", and each time I press on one of the buttons, the main dropdown menu is reset to the first item that begins with the selected letter.  

My question is "How?"  When I look at the form in design mode, I see that none of the toggle buttons have any event associated with them.  They are seemingly disassociated with the dropdown, although I am sarcastic when I say "seemingly" because they obviously do exert influence.  Each Toggle Button has a name "Filter E", "Filter T", etc., and each has an Option Value connected to the placement of that letter in the alphabet ("Filter E" = 5; "Fiter T" = 20; etc.).  Beyond this, I see nothing inherent in the form that does its work, although it clearly is.

For greater clarity, I'm including an image of one of the Toggle buttons and its properties.
Many thanks, ~Peter Ferber


ToggleButton-Properties.bmp
0
Comment
Question by:PeterFrb
  • 2
  • 2
5 Comments
 
LVL 30

Expert Comment

by:hnasr
ID: 33687323
Check the AfterUpdate event of the optionFrame that contains all the toggle buttons.  The frame value = 1, 2, 3, ... for individual toggle buttons.

Code checks the number associated with each toggle button and filters accordingly.

Check the code behind the frame control.
0
 
LVL 30

Expert Comment

by:hnasr
ID: 33687331
See the option value 10 assigned to J, 10th toggle button in the option frame, in the image above.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 33688044
see this sample db


DB-Q-26476408-ToggleButton.mdb
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 33688103
0
 

Author Closing Comment

by:PeterFrb
ID: 33693696
Thank you for the excellent concrete example of what was happening.  I understand now how toggle buttons are the equivalent of radio buttons, and the frame inherits the value of the toggle button, just as it would a radio button.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question