A
Andrew Smith
This is driving me mad. I have the following code that is meant to
check if a date field in any record of a recordset contains a null
value:
Start of code.....
With rst
..MoveFirst
Do Until .EOF
Debug.Print !dateend,
Debug.Print IsNull(!dateend)
..MoveNext
Loop
..MoveFirst
..FindFirst IsNull(!dateend)
If .NoMatch Then
More code here .....
..... End of code
I added the loop through the recordset and the debug statements as the
NoMatch was returning True when I was sure it should be false. The
output from the debug.print statements was:
26/01/2005 False
26/01/2005 False
26/01/2005 False
Null True
26/01/2005 False
So, there is one record with a null value in the dateend field, but the
NoMatch property still came up as True.
I'm going to change the code so that I loop through the recordset to
find the null values, but I'd still like to know why it doesn't work.
check if a date field in any record of a recordset contains a null
value:
Start of code.....
With rst
..MoveFirst
Do Until .EOF
Debug.Print !dateend,
Debug.Print IsNull(!dateend)
..MoveNext
Loop
..MoveFirst
..FindFirst IsNull(!dateend)
If .NoMatch Then
More code here .....
..... End of code
I added the loop through the recordset and the debug statements as the
NoMatch was returning True when I was sure it should be false. The
output from the debug.print statements was:
26/01/2005 False
26/01/2005 False
26/01/2005 False
Null True
26/01/2005 False
So, there is one record with a null value in the dateend field, but the
NoMatch property still came up as True.
I'm going to change the code so that I loop through the recordset to
find the null values, but I'd still like to know why it doesn't work.