' Return True if a date is empty ' expO1 Date ' This parameter is defined as Object as if we define it as a Date, it won't work in SQLClient Public Function EmptyDate(ByVal tdDate As Object) As Boolean Dim llEmpty As Boolean Dim ldDate As Date llEmpty = False ' Different provides handle the empty and null dates differently Select Case oApp.nSQLMode ' OleDb Case 1 ldDate = New Date(1899, 12, 30) If tdDate = ldDate Then llEmpty = True End If ' SQLClient Case 2 If tdDate Is DBNull.Value Then llEmpty = True End If ' ODBC Case 3 End Select Return llEmpty End Function