"jpr" <jp***@tin.it> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Hello friends,
I have a form named forms1 on which I have a txtbox which gets its data
from a query. This field shows values YES or NO.
On the same form I have two unbound check boxes.What I am looking for
is a code that if txtbox shows YES then checkbox1 is checked and
checkbox2 not visible.
If txtbox shows value NO, then checkbox1 is not visible and checkbox2
should be checked.
Is there a way I can do this? Thanks.
Why you'd want to do this is a bit of a mystery to me but ... in the form's
current event (untested):
If Me.txtMyTextBox = "Yes" Then
Me.chkCheck1 = -1
Me.chkCheck2.Visible = False
Else
Me.chkCheck2 = -1
Me.chkCheck1.Visible = False
End If
Of course you'd have to code for when a value is changed from Yes to No and
vice-versa and also to handle nulls. There may be other conditions to
handle too that I can't think of off the top of my head.
HTH - Keith.
www.keithwilby.com