<> not equal not working

monfas

Registered User.
Local time
Today, 20:03
Joined
Jun 18, 2012
Messages
32
Hi, I have the an update query that should be looking for records in one field that are not equal to a txt box (txtMovID) and replace them for the value that is in the text box - updating the new MovID in the table.

My criteria is:

<>[Forms]![fManifest]![MovID] - 'this is to say to look for any value that doesn't match the MovID text box.

This was working fine, but now (and I have no idea why) it will only update records where the value is not null and different from the txtMovID value, so if the record is null in that field (if the field is empty), even though different from txtMovID, the update query will not update it.

What might have happened here to access stop recognizing Null as not equal?

Thanks
 
Last edited:
Perhaps your records where previously holding a Zero Length String (ZLS), rather than a Null value.

To account for Null values simply add Or Is Null to your criteria.
 
Null, in a general sense in Access, equates to ‘unknown’.

An ‘unknown’ is regarded as false even though an ‘unknown’ can not be said to False.

Null = anything is regarded as false.
Null <> anything is also regarded as false.
Null = Null is also regarded as false.

When an ‘unknown’ is compared to anything, even another ‘unknown’ the result can not be regarded as true and therefore must be regarded as false.

Chris.
 
Thanks guys,

This makes sense now. I will fix it
 

Users who are viewing this thread

Back
Top Bottom