certain option group values determine whether cntrll labl/txt visi

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i'm using a2k and i have an option group called "Disposition" which has four
toggle buttons having values in the underlying table of 1,2,3 and 4. i wrote
this small vba for the form's on current situation so that whenever the
current record has a value of 3 or 4 a txt/label controls are visible
otherwise they aren't.

Private Sub Form_Current()
If Me.Disposition = 3 Or Me.Disposition = 4 Then
Me.Reason_Appvl_Denied.Visible = True
Me.Reason_Label.Visible = True
Else
Me.Reason_Appvl_Denied.Visible = False
Me.Reason_Label.Visible = False
End If
End Sub

it works just fine....the 'thing' about the form's development so far is
that selecting options 3 or 4 has no effect on the visibility of the two
controls. can someone help me out?

-ted
 
Ted said:
i'm using a2k and i have an option group called "Disposition" which has four
toggle buttons having values in the underlying table of 1,2,3 and 4

Ted,

I have several procedures like this, and for all of them I have similar code
in the option group's Click procedure. I would just copy and paste those
lines to Disposition_Click, and it should work fine (all of my procedures do,
at any rate). I don't think there are any drawbacks to using this approach.

Hope it helps,
-Nick
 
I don't know how to edit my own posts, I'm not good with forums...

Anyways, you might also want to reference the Value property;

use "Me.Disposition.Value" instead of just "Me.Disposition"

Generally not adding in the .Value is fine, but occasionally my programs have
caused major headaches over that point; it could be the cause of your
problems as well.

-Nick
 
thanks, nick:

i'll give each of your posts a whirl in the morning tomorrow and let y'know
how it all went.

-ted
 
Back
Top