Hello,
I'm working at a simple Access '97 + VB4 application, and I ran into a
terrible problem: something I never modified now gives me a totally
unwanted "Invalid use of null" error.
It happens in a Text.LostFocus event, this block:
Do While Not TB6.EOF
If Year(TB6(0)) = Val(Trim(Text1. Text)) Then
!!!!!!!!!!!!!He re!!!!!!!!!
...
bla bla bla
...
End If
Where TB6 is a table. The text in Text1 is compared to the Year taken
out of the first colum in TB6. Checking the database itself, I have
entries for 2002, 2002, 2003, 2005... and up to this morning everything
worked so good. Now, it only works ok for 2005, while other values are
considered to be null and error creeps in.
Any idea? I really don't know what to do.
Thanks!
ZDS
I'm working at a simple Access '97 + VB4 application, and I ran into a
terrible problem: something I never modified now gives me a totally
unwanted "Invalid use of null" error.
It happens in a Text.LostFocus event, this block:
Do While Not TB6.EOF
If Year(TB6(0)) = Val(Trim(Text1. Text)) Then
!!!!!!!!!!!!!He re!!!!!!!!!
...
bla bla bla
...
End If
Where TB6 is a table. The text in Text1 is compared to the Year taken
out of the first colum in TB6. Checking the database itself, I have
entries for 2002, 2002, 2003, 2005... and up to this morning everything
worked so good. Now, it only works ok for 2005, while other values are
considered to be null and error creeps in.
Any idea? I really don't know what to do.
Thanks!
ZDS
Comment