K
K M
I found the Survey form at SlipStick.com very useful
(http://www.slipstick.com/files/survey.zip.), but it has a few
problems. I'm trying to fix them with what I thought would be some
very simple data validation and am getting frustrated.
On a 1-10 rating question, the user can enter values of -5, 3.2, and
30. If the question is a 1-10, then that range should be the only
range acceptable.
I haven't tackled the decimals yet, because I can't even get the range
to work. Here is what I have in the code:
Sub txtRate_Change()
If txtRate.Value<1 Or txtRate.Value>10 Then
msgResponse = MsgBox("Please enter a value between 1 and 10",
vbOKOnly)
txtRate.SetFocus
End If
End Sub
I cannot get data validation in the actual text box to work in design
mode, either. Can anyone point me in the right direction?
(http://www.slipstick.com/files/survey.zip.), but it has a few
problems. I'm trying to fix them with what I thought would be some
very simple data validation and am getting frustrated.
On a 1-10 rating question, the user can enter values of -5, 3.2, and
30. If the question is a 1-10, then that range should be the only
range acceptable.
I haven't tackled the decimals yet, because I can't even get the range
to work. Here is what I have in the code:
Sub txtRate_Change()
If txtRate.Value<1 Or txtRate.Value>10 Then
msgResponse = MsgBox("Please enter a value between 1 and 10",
vbOKOnly)
txtRate.SetFocus
End If
End Sub
I cannot get data validation in the actual text box to work in design
mode, either. Can anyone point me in the right direction?