Rover Posted December 8, 2004 Posted December 8, 2004 I have 2 fields, test and test2. Test2 is a text field I use for input (or a number field, it makes no difference to my problem) Test is a calculation that returns a number with the formula TextToNum(test2). I want to see if test2 contains a numeric, if not I expected test to be blank. It works as expected except when test2 contains no numerics and starts with the letter f, n, t or y. Upper/lower case makes no difference. If test2 starts with f or n, then test=0. If test2 starts with t or ty, then test=1 I can figure out a work-around, but this bugs me. Can anybody explain what's happening? Please? Pretty-please? Thanks
-Queue- Posted December 8, 2004 Posted December 8, 2004 Use TextToNum("a" & test2). T/F and Y/N are considered boolean for True/False and Yes/No in versions before 7. So any strings starting with those letters are also treated as boolean.
Rover Posted December 9, 2004 Author Posted December 9, 2004 Well, DUH! Don't I feel stupid?! Guess I didn't see the forest for the trees, or is it see the trees for the forest? Thanks much for the explanation.
Recommended Posts
This topic is 7358 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now