D
Darhl Thomason
I have this code snippet in my db. Every time this code runs, it always
executes the code under the Else clause, even when strFilter = Null
(verified by adding a watch in the VBA editor). What am I missing here?
Thanks!
Darhl
If strFilter = Null Or strFilter = Empty Or strFilter = "" Then
CurrentDb.Execute strSQLMakeTable & strSQLMakeTable2, dbFailOnError
Else
strSQLMakeTable2 = strSQLMakeTable2 & " WHERE "
CurrentDb.Execute strSQLMakeTable & strSQLMakeTable2 & strFilter,
dbFailOnError
End If
executes the code under the Else clause, even when strFilter = Null
(verified by adding a watch in the VBA editor). What am I missing here?
Thanks!
Darhl
If strFilter = Null Or strFilter = Empty Or strFilter = "" Then
CurrentDb.Execute strSQLMakeTable & strSQLMakeTable2, dbFailOnError
Else
strSQLMakeTable2 = strSQLMakeTable2 & " WHERE "
CurrentDb.Execute strSQLMakeTable & strSQLMakeTable2 & strFilter,
dbFailOnError
End If