hey guys, i am building some error handeling into my project and am wondering why this isnt working i have tried it 2 ways, this is the first:
I know that the value for EndDate in the first record is blank (nothing there), when this code runs i get an error : Invalid use of null and it stops on this line
i have tried changing the if statements to say this instead:
- "" instead of Null
but still no luck.
i have also use this code instead, which is a lot smaller:
but still, the problem persists...
any ideas are much appreciated
cheer
Jurgen
Code:
If rst![Scheduled for] = Null Then
GoTo NullRecord
SkippedRecords = SkippedRecords + 1
Else
StartDate = rst![Scheduled for]
End If
If rst![Expected Finish Date] = Null Then
GoTo NullRecord
SkippedRecords = SkippedRecords + 1
Else
EndDate = rst![Expected Finish Date]
End If
If rst![Committed Start Time] = Null Then
GoTo NullRecord
SkippedRecords = SkippedRecords + 1
Else
StartTime = rst![Committed Start Time]
End If
If rst![Expected Finish Time] = Null Then
GoTo NullRecord
SkippedRecords = SkippedRecords + 1
Else
EndTime = rst![Expected Finish Time]
End If
I know that the value for EndDate in the first record is blank (nothing there), when this code runs i get an error : Invalid use of null and it stops on this line
Code:
Else
EndDate = rst![Expected Finish Date]
End If
i have tried changing the if statements to say this instead:
Code:
If rst![Expected Finish Time] = "" Then
but still no luck.
i have also use this code instead, which is a lot smaller:
Code:
For Each fld In rst.Fields
If fld.Value = Null Then
MsgBox "null record"
Else
End If
Debug.Print fld.Value & ";";
Next
Debug.Print
but still, the problem persists...
any ideas are much appreciated
cheer
Jurgen