CoachBarker
Well-known member
- Joined
- Jul 26, 2007
- Messages
- 133
- Programming Experience
- 1-3
If I have a text box that I only want the values A, B, C, D or F entered into how can I validate this and in what event of the text box should I be using? I tried
[CODE ]
If Me.txtMidterm.Text <> "A" Or Me.txtMidterm.Text <> "B" Or Me.txtMidterm.Text <> "C" Or Me.txtMidterm.Text <> "D" Or Me.txtMidterm.Text <> "F" Then
MessageBox.Show("Please enter either A, B, C, D, or F")
Me.txtMidterm.Clear()
Me.txtMidterm.Focus()
End If
[/CODE]
[CODE ]
If Me.txtMidterm.Text <> "A" Or Me.txtMidterm.Text <> "B" Or Me.txtMidterm.Text <> "C" Or Me.txtMidterm.Text <> "D" Or Me.txtMidterm.Text <> "F" Then
MessageBox.Show("Please enter either A, B, C, D, or F")
Me.txtMidterm.Clear()
Me.txtMidterm.Focus()
End If
[/CODE]