javajom
Javajon
- Local time
- Today, 22:47
- Joined
- Mar 5, 2008
- Messages
- 37
Hi,
I'm new to the vb code and having a problem with the form/vb, I've written a function that will check a password entered into the form against an array. It's a sinple form that has a password enter box, which is formatted to password in the properties a enter button and a cancel button. The cancel button works fine as once pressed exits the application. The problem is that if you press enter with no input in the password dialog box I get: Invalid use of Null (Error 94).
So the code gives the value of Forms!secure111.ques.Value to pWord and then compares it to the array contents, which works fine I've tried to cover the null value by
If IsNull(Forms!secure111.ques.Value) Then
Application.Quit
End If
But the line: pWord = Forms!secure111.ques.Value always shows the error Invalid use of Null (Error 94) when no data in dialog box when enter is pressed. Any ideas?????
I'm new to the vb code and having a problem with the form/vb, I've written a function that will check a password entered into the form against an array. It's a sinple form that has a password enter box, which is formatted to password in the properties a enter button and a cancel button. The cancel button works fine as once pressed exits the application. The problem is that if you press enter with no input in the password dialog box I get: Invalid use of Null (Error 94).
PHP:
Dim pWord As String
pWord = Forms!secure111.ques.Value
If IsNull(Forms!secure111.ques.Value) Then
Application.Quit
End If
DoCmd.Close acForm, "secure111", acSaveNo
So the code gives the value of Forms!secure111.ques.Value to pWord and then compares it to the array contents, which works fine I've tried to cover the null value by
If IsNull(Forms!secure111.ques.Value) Then
Application.Quit
End If
But the line: pWord = Forms!secure111.ques.Value always shows the error Invalid use of Null (Error 94) when no data in dialog box when enter is pressed. Any ideas?????