evil. Mostly because it's allowed by default in any field, and half the time if you turn that off for a field, you can't put the empty string into that field. (That might be more related to Access/SQL2005 interaction though. You might always be able to leave the field blank in a bound control if the field is part of a Jet table. Yes, this is retarded: welcome to Access.)
Anyway, it's much simpler if you can stop allowing NULLs in your fields. NULL is not equal to "", and is not LIKE "*" (this is correct!). If a NULL value is included in any comparison, the result is always NULL, and so the comparison never succeeds. (Well, unless the comparison is "X Is Null". That actually always returns a boolean. Anything else, though, returns true/false/NULL, not true/false.)
But between that and the way Access (half the time) doesn't let you enter "" into a field if that field prevents NULLs, I've tried to swear off Access forever. It's been working lately... ;-) |