A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

second Option group not recognized



 
 
Thread Tools Display Modes
  #1  
Old April 30th, 2008, 09:33 PM posted to microsoft.public.access.forms
Molasses26
external usenet poster
 
Posts: 25
Default second Option group not recognized

I created a form with one option group on it and later added a second option
group but when I try to reference the options in the second group in VB code
it doesn't "see" them.
Basically my form consists of a text box called KW
One option group called Metering with 4 choices
Option11 = 1
Option13 = 2
Option15 = 3
Option17 = 4
One option group called Service with 4 choices:
Option22 = 5
Option24 = 6
Option26 = 7
On my KW field I want to write an AfterUpdate code that disables the
Option26 in the Service group if the value of KW is less than 20.
IF me.kw 20 then
me.option26.enable = false
else
me.options6.enable = true
end if

When I am typing the code and I type me. I see the options from the first
group on the list but not the options from the second group. What is my
malfunction here?

Thanks!
  #2  
Old May 1st, 2008, 07:12 AM posted to microsoft.public.access.forms
strive4peace
external usenet poster
 
Posts: 1,670
Default second Option group not recognized

modify the value of the FRAME

'set option26
me.service_controlname = 7

btw, you really should give your controls meaningful names. Access, of
course, has no idea what to call them, so it just names them like this:
option26. I would do something like Service_something

where
'something' describes the option

OR, what I actually do is this:
Service_03
if it is the 3rd choice in a frame called Service ... but then I have
code that loops through the option choices and boldfaces the label of
the selected option so there is a logical REASON to use numbers in the
name smile


Warm Regards,
Crystal

Access Basics
8-part free tutorial that covers essentials in Access
http://www.accessmvp.com/Strive4Peace/Index.htm

*
(: have an awesome day
*



Molasses26 wrote:
I created a form with one option group on it and later added a second option
group but when I try to reference the options in the second group in VB code
it doesn't "see" them.
Basically my form consists of a text box called KW
One option group called Metering with 4 choices
Option11 = 1
Option13 = 2
Option15 = 3
Option17 = 4
One option group called Service with 4 choices:
Option22 = 5
Option24 = 6
Option26 = 7
On my KW field I want to write an AfterUpdate code that disables the
Option26 in the Service group if the value of KW is less than 20.
IF me.kw 20 then
me.option26.enable = false
else
me.options6.enable = true
end if

When I am typing the code and I type me. I see the options from the first
group on the list but not the options from the second group. What is my
malfunction here?

Thanks!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:30 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.