If Help?

iantaylor

New member
Local time
Today, 03:40
Joined
Oct 8, 2001
Messages
9
I'm using a text box, so if someone inserts an R, X is true if someone inserts a O, X is false.
However if the field is left blank it leaves it at true and I need it to show false.

I've tried a few things but haven't been able to work it out, can someone please tell me what I need to do.

Thanks
Ian
 
I am assuming you are using a keypress event or are you querying the fiels retrospectively? If you are using an if...then...else statement then try the following syntax

Sub TextBox_Keypress(KeyAscii As Integer)
Dim X as Boolean
If KeyAscii = 82 (Capital R, r is 114) Then
X=True
elseif KeyAscii = 79 (Capital O, o is 111) Then X=False
Else X=False
End If
End Sub

I think this will work

[This message has been edited by Fizzio (edited 10-23-2001).]
 

Users who are viewing this thread

Back
Top Bottom