Im running code behind a button which updates data from a table. However if it encounters a Null value it gives a null error and stops running. I have tried an if statement which checks if its Null first and if so doesn't run the module but it still gives a null error. I've also tried "" but it gives a type mismatch. Any suggestions how you check if a date field empty the code is below would be greatly appreciated
Dim StartDate As Date
While RequestType <> ""
StartDate = [ReturnsReceiptDate]
If StartDate = "" Then 'Problem is here
'Do Nothing
Else
Call DeltaDays6(StartDate)'Module being called
End If
Day_Since_ProductReturn = DeltaDays6(StartDate)
DoCmd.GoToRecord , , acNext
Wend
Dim StartDate As Date
While RequestType <> ""
StartDate = [ReturnsReceiptDate]
If StartDate = "" Then 'Problem is here
'Do Nothing
Else
Call DeltaDays6(StartDate)'Module being called
End If
Day_Since_ProductReturn = DeltaDays6(StartDate)
DoCmd.GoToRecord , , acNext
Wend