Changing a subform property

Took me a minute to sort that one out!

Looks like that joke failed the test - if you have to explain it, its not funny. :D
In fact, you could say it was a load of bollocks
Certainly not the dog's bollocks
 
I tend to use True and False, and I believe True is -1 or 1 and False =0
False is always just 0. Sometimes True can be any other number so you have to be careful with what is being tested and where being used. Try this
Code:
Sub testFalse()
Dim isFalse As Boolean

isFalse = 0
MsgBox "when 0, evaluates to " & isFalse

isFalse = 1
MsgBox "when 1, evaluates to " & isFalse

isFalse = -1
MsgBox "when -1, evaluates to " & isFalse

isFalse = 6
MsgBox "when 6, evaluates to " & isFalse

End Sub
Likely you would not assign 6 to boolean, but if that value could be returned you should know what to expect and code for the potential.
 
Looks like that joke failed the test
Only on this side of the pond, apparently. If asked, I would have said it is the equivalent of the UK "rubbish" (which to me is "garbage" rather than "nonsense") as opposed to "being told off". Apparently that's wrong too.

Being so innocent, I wouldn't have noticed my variable was a word for rubbish, anatomical parts or anything else. That's one that won't surface again in my code!:)
 
As Micron said, False = 0 but True is any value that isn't zero.
Having said that if you enter non-zero values other than -1 in a boolean field, Access immediately changes the value to -1

I'm glad my naming convention for boolean variables is bln as blnLocked is a much safer name :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom