Forms :: Access 2007 / Option Group With Alternating Toggle Buttons
Apr 8, 2014
I have an option group with two toggle buttons. Is it possible to set up the option group such that only one toggle button is visible at any given time (i.e. the unselected option) So the group has a default value. Clicking the visible button should switch the value, hide the button (option) associated with that value and show the alternate button (option) for the alternate value?
Basically only having one visible button at any given time which toggles between the two values (but I'd like to retain it as an option group, rather than as two independent buttons, as that gives me a handy value from which to determine control sources elsewhere)
I've tried setting the visibility of the buttons from the AfterUpdate event of the option group but it doesn't work.
I know I can do this with independent buttons but was hoping there was a quick(er) and easy way to do it with an option group instead?
I am using an Access database for a foreign language dictionary project.
One of the forms I use is populated by a query (qryLemmaTable) to retrieve information from tblLEMMA.
This form works precisely as I intend it to work, but there is a glitch on it that is driving me mad.
The form in question has an option group with 11 radio buttons that correspond to the parts of speech associated with each word in tblLEMMA.
When I click on the button optAdjective I apply a filter and the only records that are displayed are adjectives. (The same applies for Nouns, Verbs, Prepositions etc.)
Here is the glitch: even though the radio buttons apply the filter correctly, no “black spot” appears in the button. Other signals on the screen let me know what word type is selected, so I can accomplish what I want, but I want the “black spots” too!
Perhaps this will be a clue: For each radio button I use the following code in the GotFocus event. Me.FilterOn = False Me.Filter = "wordtype = 'A'" ‘(or N, etc) Me.FilterOn = True
And this for the Lost Focus event Me.FilterOn = False
Hello, I wonder could anyone help, rescue and succour me.
As a former VB6 developer, I'm now working with wonderful Access VBA 2000 which makes the simplest operation such as creating a listbox or adding a control array into a living, breathing nightmare.
Today's incubus is option buttons.
Dear people, please tell me how it can be so hard to create a group of option buttons which are mutually exclusive and by whose value I can set another variable? I tried just sticking them on the screen, but then soon sobered up when I realised that Access would merrily allow me to select all of them if I so wished in joyous defiance of what an option button is actually FOR.
So I consulted the oxymoronic Help (even though it's impossible to construct an oxymoron with one word, this particular piece of functionality has somehow managed it) and was advised by same to create an option group. This I duly did - then realising that I had to set this property called Option Value 1,2, 3 etc. No sooner said than done. Anything to get it over with.
Now having different values, one would imagine that all I do is give each option button the same name. But no - control arrays in this environment would be like the discovery of the wheel in Caveman Land. So I google it and am told that I have to select the name of the option group.
Now where in all Christendom or Islamdom or NoGodsAtAllDom (in case Richard Dawkins is logged on and wants to help) can I find the name of this option group? Nowhere was I asked to assign an option group name, nowhere can I see a control that resembles an "option group", whatever that may be.
If someone could enlighten me I would be very grateful as a simple problem has once again taken hours thanks to the Access VBA environment. Grrrrrr
I stumbled upon the Option Group function just yesterday and, happy as a clam, I created a group with 2 options in radio button style. I assigned the values to a field called Registration_Type as the 2 options are "Confirmed Registrants" and "Prospective Attendees".
[Great. That part works well. When I look at the table, a 1 or a 2 is in that field so it's great to know how to control accidental ticking of radio buttons (previous 450 records or so didn't have this option group functionality so one might easily tick one of the buttons. So one part of controlling option group I know I can handle via the table itself for now.]
The challenge is how to ensure the user always ticks one or the other ... I went back to the main table and tested the 'required entry' option for the Registration_Type field but forcing an action like this is not ideal in my mind. The usual error message vagueness for the average user is no good and I don't want to limit the user so much.
Is there a way to simply have a popup come up warning that neither radio button was ticked? Perhaps something linked to the form - i.e., maybe "after update"?? I only learned about attaching code to before and after update on controls a couple of days ago, so not sure if this would be best approach.
Just something to let the user know that nothing has been ticked in the option group as that controls in which of 2 reports the data will show up in so any record not ticked might mean a registrant being left out, which would be rather disastrous <g>.
When I create an option group, the buttons or checkboxes appear to the left of the labels. Is there an easy way to make them come out on the right side of the labels? When I move them around manually it is hard to make the buttons align properly with the labels.
I have a form with about 40 Toggle buttons on it. I want the form to populate from a table. This table stores the status from rooms.
My table name is [Room] Fields [Room] and [Room_Status]
I want to call the button BtnBS1 (Room BS1) and if the status for that room is occupied the button when loaded will be RED, and if it is available it must be green.
I want the form to be an graphical overview of what rooms are occupied and what rooms are available. By clicking on a green room I want another form to open to allow me to fill it with data.
I have a tab control at the bottom of my main form, and some of the tab pages contain subforms. On one of the subforms I have created a filter to divide the content into "complete" and "incomplete." I have also added a toggle button option group to the subform to toggle the filter (one button for "complete" and one for "incomplete"). I'm using a macro to apply the filter, but it isn't working. The filter does work properly if I use the "Toggle Filter" button on the Ribbon, but I want to create something a little more user friendly.
If [tgl_Complete_Incomplete]=-1 Then ApplyFilter Filter Name Where Condition =(([tbl_Action_Items].[Completed])=True) Control Name [Forms]![Search_by_name]![sfctlActionItems].[Form]![tgl_Complete_Incomplete] Else RunMenuCommand Command RemoveFilterSort End If
I get the error message "The 'ApplyFilter' action requires a valid control name that corresponds to a subform or subreport."
If I remove the content of the Control Name field and open the subform independently (i.e. not as a subform), everything works fine.
how to use option buttons? I've looked around, but I cant find any site, thread, etc, etc on how to fully use them. I have 3 option buttons, there "Retired" "Current" and "Not Stocking" I want them to be tied the the list box named "lstItems" that gets its info from a qryItems.
I am doing a worksheet for college and have been asked to create option groups on a form, but I cannot work out how to do this.
The screenshot shows what I have to do but I cannot get the option group wizard to open.
When creating my form based on the design in the screenshot I dragged the Rate field onto the design view sheet but it has only one option button connected to it, I need to add another one that will be connected to the same field and am not sure how to do it. I did try adding another option button from the control bar but I am not sure if is connected to the same field with the correct yes/no properties.
I have 2 Option buttons that I want to use to control a combo box. If I select Option1 then I want it to pull from one table for the drop-down choices. If I select Option2 I want it to pull from a different table. The Option buttons and combo box are all on the same form.
Say I have two bubbles (options,buttons, whatever you know them as) I want the system to be set up so that only one of the two can be "true" at a time. Say they are titled Option1, and Option2. What code would I put on them so only one can be "true" at a time. If Option1 was true, and then someone clicked on option2, I want it to cause option 1 to go false.
I'm looking to have either a combo box,, or 2 options buttons (whichever is easiest) that set a date field based on what is selected in the combo box/ option buttons.
The variables are 'Payment in 30 days" " Payment upfront"
if "payment in 30 days" is selected the date field on the form will enter the date as + 30 days from todays date if "payment upfront" is selected the field on the form will enter todays date.
This date field must be blank unless an option is selected, as this information is only entered in a later stage of the form.
I've tried a few different ways to enter this but i can't quite get it to work as i want.
I'm building a workCube reservation system and I've been tasked to have it work kind of like an airplane seat reservation system. I've laid out my form with option buttons representing the location of each available space. (space1, space2, space3...space16)
My desired outcome is to be able to select a date from a calendar popup and have the options buttons react to that date if they have been reserved. (change color and indicate "reserved").I've tried to create the form based on a query which represents the "booked" table.
Tables:
Employee (k)empID emplyeeName
Space (k)spaceID space
Booked (k)spaceID (k)empID (k)bookdate
Some rules a space can be booked by any ONE employee on any day.How can I get any and all of the option buttons to react if there is a reservation in place on the day indicated by the calendar?
Hi - I have another problem. I hope you can help me out on this one.
Right now, I have 3 toggle buttons to control the visibility of 3 subforms. However, I only want a single subform to show at any given time. So, if I were to select toggle 1 it should give me subform 1, and afterwards if I select toggle 2 it should give me subform 2 WITHOUT showing me toggle 1.
Is there anyway to get the toggle buttons to work with each other?
I'm not entirely new to Access, but I don't have the formal training or experience to accomplish what I'm attempting. And, after hours of research, I haven't been able to find anything that quite works. I know it's do-able, I just can't figure it out. Any help is much appreciated. I'm using Access 97.
In a form (MasterBadgeForm), all fields require completion. However, I want to force the user to complete 2 fields before any of the others are visible.
The 1st 2 required fields are: - HostLastName: ComboBox (user's last name based on a simple query called HostMasterQuery) - Visitor_Guest: Bound option group frame with option buttons "Visitor" (option value = 1) and "Guest" (option value = 2).
Note: The logic behind using an option group frame (instead of check boxes, etc.) is to force the user to choose "Visitor" or "Guest", but not both or none.
After both fields ("HostLastName" and "Visitor_Guest") are completed, I want 2 things to happen:
First: Depending on the choice selected in the Visitor_Guest option group frame, I want respective combo boxes to either be visible/available, or not. For example, if the user selects the "Visitor" option button, I want to make visible a combo box named VBadgesCombo (based on a simple query that has pre-defined "Visitor" numbers) and "hide" the combo box named GBadgesCombo. The same concept applies if the user selects the "Guest" option button.
Second: I want all the other required fields to become visible.
I've done a ton of research, but I just can't quite figure it out. Any help is much appreciated.
We just upgraded from 97 to 2003. Just a few little issues. We have an option group.....3 different toggles. One is supposed to bring up incomplete records by check if the 'end time' field is empty:
I have an option group with 4 options and I want them to display traffic light colours when an option is clicked. So if option 4 is clicked it displays red, if option 1 is clicked it displays green, however, once clicked the colours remain, and dont disappear when I click another option and they remain for all records.
Private Sub Frame742_AfterUpdate() 'Select Case Me![Frame742] ' Case 1
I have would like to have a option group requery a list box with 2 yes/no columns as the criteria.
First Option = No criteria Second Option = Yes in first column only Third Option = Yes in second column only
So far I've been able to get option 1 and 2 to work, but I've not been able to define the same value to the third option, some of the values in the 2 columns over lap so using a single option doesn't seem to be the right method.
In creating a form with checkboxes created using the "option group" control type,
I am trying to find a way to clear all the checkbox options in an option group after having checked an option. For instance, if the user checks one of the options but then decides they actually want to skip that question altogether and leave it blank - is there a way to clear all options, or reset the question?
I'm using option group with value 1 and value 2 with a command button to open two different forms. This is the code:
Code: Private Sub Command9_Click() Dim strForm As String Select Case Me.Cornice0 Case Is = 1
[Code] ....
I would like to close form's option group once clicked the command button after the opening of the requested value form. I tried Docmd.close but all I get is the option group no more working.
I have a main form named as FOTOFILM and a child form named as FOTOFILM_Subform ( Datasheet view, and datasource is a query builted on FotoFilm_table). they don't have relationship but the datasource for both is the same (FotoFilm_table).On the main form FOTOFILM, I have an option group named optChoose and 5 options within. Options are;
The last week, The last month The last 3 months The last 6 months the last 12 months
I would like to query / filter FOTOFILM_Subform by clicking any option.The field name ( to be filtered) IstekTrh (Date/Time-ShortDate)
I have a frame on a form with 2 toggle buttons in it - i want to be able to toggle the buttons to set criteria for a query which i can load as a report from clicking a button - is it possible to do with IFF? or is there an easier way - is it possible to have the report as a sub-report on the form and it to change when i toggle the buttons?
I have a form with 5 options in a group. This works fine when I only have 1 filter applied to each button. I need to select the "Not Collected" button and have it filter out and show "Collected = No" and "Deleted = No". Here is my code..Case 3 is the one I'm currently working on. I can get the others once I figure out the first one.
Private Sub Frame799_Click() Select Case Frame799 Case 1