VBA Code in Access w/ option buttons
Can anyone give me a hand on this?
Its really important, that I get this answered. Its for my job
Thank you for taking the time to report an issue.
What's wrong... Please write below.
I have limited experience with code so hopfully it's just an easy fix that I'm missing. My code in the On Open event for the report is:
Private Sub Report_Open(Cancel As Integer) If Me.fmeLMASWorkingOrder = 2 Then Me.fmeLMASCompCondition.Visible = True Else Me.fmeLMASCompCondition = False End Sub
It tells me I have an expression that has no value and highlights "If Me.fmeLMASWorkingOrder = 2 Then"
I've tried a couple different ways can can't get this to work
The option group frame is frame27, the first buttons name is check30.
Lastly, to indicate check30s state when checked do I use true/false or the option value in its property sheet
An option group makes selecting a value easy because you can just click the value that you want.
Only one option in an option group can be selected at a time.
In a form or report, an option group consists of a group frame and a set of check boxes, option buttons, and toggle buttons.
My problem is the option buttons don't refer to a single record. for example: the first option will be current which I want to select "active" and "possible" in out of one of my tables. The second option button "Cleared" will select only "Cleared" from the table and lastly the option "All" will select all records.
I have a form with several buttons that call functions, one to run a VBA module, the other performs some VBA then opens a form.
Yesterday they all worked fine - today very time they are clicked they crash access.
Now here is the weirdest bit - if I put a debug stop in the code in the On_Click event of the buttons access does not crash!
Has anyone seen this before and is so how have you fixed it
This is fine for all the simple tasks, but what I have myself into is a little more complex than the Macro builder is ready tohandle I think.
Before, when I created a button, not a Macro. I am trying to build the following button types:
Button 1 - Update a Field in a table, Save form, Close form
Button 2 - Update a field in a table, save form, new record
Button 3 - Update a field in a table, save form, print report, close form . and so on and so forth.
I used to put 3 or 4 buttons on the form, then copy and paste the generated vba in the correct order in a single button, and delete the dummy buttons. But now it seems as the basicfunctions are built using an embedded macro, and when that is combined with VBA, Access must choose between one or the other, rendering my button useless.
Is there a setting in 2010 that will change the way buttons are created in that VBA is used by default instead of macros?
Could someone help on either all of them or some of them please
1. I am having difficulty getting the group of option buttons to allow one and only one to be selected.
2. If the ME1 button is selected, that field in the table will be populated, if ME2 is selected the ME2 field should be populated, etc, for each record.
I can't figure out how to test to see which one is selected.