I have found this a few times whist writing VBA in access, that if I want to see if a field on a form is empty that coding to see if the value is equal to nothing does not work but coding to see if it is not equal to nothing does.
For example:
The above code does not exectute the do stuff even when the combobox in this case is empty.
However
Will function as would be expected with Stuff exectued when the box is empty but not when it is not.
I've put this in forms as that's what I'm currently working on. Can anyone explain this? It's not exactly a terminal issue but it is confusing.
For example:
Code:
If cbresponsible = "" Then
' Do Stuff
End If
The above code does not exectute the do stuff even when the combobox in this case is empty.
However
Code:
If cbresponsible <> "" Then
Else
' Do Stuff
End If
Will function as would be expected with Stuff exectued when the box is empty but not when it is not.
I've put this in forms as that's what I'm currently working on. Can anyone explain this? It's not exactly a terminal issue but it is confusing.