What's happen with my label

  • Thread starter Thread starter New_Access
  • Start date Start date
N

New_Access

I have an option value with four options.
I write some code behind 'on click' event
of the frame.But there is something strange,
Option group's label become disable when
the option group value is 2 or 4.What's wrong
with that label.
 
I have an option value with four options.
I write some code behind 'on click' event
of the frame.But there is something strange,
Option group's label become disable when
the option group value is 2 or 4.What's wrong
with that label.

We aren't there, and have no way to know.

Care to post your code, and the properties of the option group?

John W. Vinson [MVP]
 
Thank's for help,
This is the code behind 'on click' even

Private Sub fra_Rotationspeed1_Click()
Dim MENU As Integer
MENU = fra_Rotationspeed1.Value
Select Case MENU
Case 1: Remarkrotationspeedspec1.Value = "Minimum"
Rotationspeedlolimit1.Enabled = True
Rotationspeedhilimit1.Enabled = False
Rotationspeedaveragelimit1.Enabled = False

Case 2: Remarkrotationspeedspec1.Value = "Maximum"
Rotationspeedlolimit1.Enabled = False
Rotationspeedhilimit1.Enabled = True
Rotationspeedaveragelimit1.Enabled = False

Case 3: Remarkrotationspeedspec1.Value = "Range"
Rotationspeedlolimit1.Enabled = True
Rotationspeedhilimit1.Enabled = True
Rotationspeedaveragelimit1.Enabled = False

Case 4: Remarkrotationspeedspec1.Value = "Average"
Rotationspeedlolimit1.Enabled = False
Rotationspeedhilimit1.Enabled = False
Rotationspeedaveragelimit1.Enabled = True
End Select


End Sub

Properties
Default value : 1
Enable : Yes
Locked : No
 
What's the Name property of the option group control? Sounds like it's being
disabled itself. Are the other controls (rotationspeedlolimit1 etc.) getting
appropriately enabled and disabled? What kind of control is
remarkrotationspeedspec1? You refer to a label in your post but not in your
code... what label?

I'd avoid the : notation -

Case 1
<statements>
Case 2
<statements>
End Select

works fine.
Thank's for help,
This is the code behind 'on click' even

Private Sub fra_Rotationspeed1_Click()
Dim MENU As Integer
MENU = fra_Rotationspeed1.Value
Select Case MENU
Case 1: Remarkrotationspeedspec1.Value = "Minimum"
Rotationspeedlolimit1.Enabled = True
Rotationspeedhilimit1.Enabled = False
Rotationspeedaveragelimit1.Enabled = False

Case 2: Remarkrotationspeedspec1.Value = "Maximum"
Rotationspeedlolimit1.Enabled = False
Rotationspeedhilimit1.Enabled = True
Rotationspeedaveragelimit1.Enabled = False

Case 3: Remarkrotationspeedspec1.Value = "Range"
Rotationspeedlolimit1.Enabled = True
Rotationspeedhilimit1.Enabled = True
Rotationspeedaveragelimit1.Enabled = False

Case 4: Remarkrotationspeedspec1.Value = "Average"
Rotationspeedlolimit1.Enabled = False
Rotationspeedhilimit1.Enabled = False
Rotationspeedaveragelimit1.Enabled = True
End Select


End Sub

Properties
Default value : 1
Enable : Yes
Locked : No

John W. Vinson [MVP]
 
John,thank's first for your kindness.
What's the Name property of the option group control?
The name is fra_Rotationspeed1
Are the other controls (rotationspeedlolimit1 etc.) getting
appropriately enabled and disabled?
Yes it's work fine John.
What kind of control is remarkrotationspeedspec1?
It's a textboxes.I want the user no need to type its value.
So the value controlled and perhaps not different when
two record have the same option group value.
You refer to a label in your post but not in your
code... what label?
My option group label.

May be it's better if I bit describe my form.I want to use this
form for adding new reord only.Excatly a specification table.
Perhaps,later I can retrieve the records and use it values as
'' limit lines'' when the user input data in another form or subform.
But NOT all the records have the same specification so for some
records there might be some fields are blanks.So I want to control
the user to fill the data in the corrrect fields cause spec is sensitive
refer to the result,right?.And 'remarkrotationspeedspec1' it self is a
remark only ( Data type ----> Text ) whether it is Min,Max,Range
or average.Hope you get a good description now.
 
Back
Top