- Local time
- Today, 13:45
- Joined
- Sep 12, 2006
- Messages
- 16,096
It might actually be hard to fix. The real issue is that it's an undocumented feature. I bet it took a while for you to realise it was failing.I can. The point of the design I selected was that I didn't have to. The incorrect response of the DLookup function means that I now DO have to again, or figure out some other way to retrieve my non-null empty string. When I have an empty string, I expect the DLookup function to get it for me, not turn it into a null. It is literally finding the string and then turning that found data into something that is NOT in the table before handing it to me.
Suppose you asked a function to find the name 'Smith', and it did so, then turned it into 'Jones' before giving it to you. That is what is happening, and I don't understand why MS doesn't repair it. It has apparently been known for quite some time, and it is simply wrong. It can't be that hard to fix.
On a vaguely similar thing, I was trying to use a date field in an order to limit a later action. If the date field had a value, then the delivery has to take place on the specified date. If it was null, it could be supplied on any date. The problem was I wanted the order to be unique, but I found out that access has a different concept of uniqueness where nulls are involved. I ended up having to use date 0 (which is obviously 1899), and specifically test for date 0 in my delivery date code. (Analogous to the issue the 0/null is causing you). Maybe I could have added a "specific date only" flag as well as the date field, but I thought the null itself would accomplish that.