I suggest you to access the control using "ME" like below. For a check box or an option button, they will both fire when the control's value is changed by the user. Incidentally, I don't think it makes any any difference whether you use the Click event rather than the AfterUpdate event in this case. Or several even more verbose reference structures. If the code is not running in the module of the form you want to refer to, then you need to go through the Forms collection: (though I much prefer using the "Me" qualification to ensure there can never be any confusion). Or you can let that be implied (so long as the control name doesn't conflict with any other name that is currently in scope: Object where the code is running, like this: If "QueryForm" is the name of the form where this code is running, then you can just use "Me" - a built-in reference to the That would be incorrect because you can't refer to a form without some reference path that leads to it. Tried running it in a module, and getting an Object Required error on the first line. Just not understanding how this operates. I have tried a few different methodologies for the above VBA, and either I am not getting the syntax right or I'm really This method has netted me an error that the OLEP connection wasn't working and there was an issue with the active X control. Things I have tried: coding an After Update event. Text field is used to tell my SQL what to query for in the data set. The trick is I need the selection of the option button to prompt a value in a text field. I have a form, and I need option buttons in the form, not an option group but option buttons because I need the user to be able to pick more than one. I have been to multiple forums and have not found an answer that actually helps yet. Okay, I have been racking my brain trying to figure out how to get this to work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |