empty field
David Thompson
dthmpsn1 at uiuc.edu
Tue May 6 16:54:50 PDT 2008
>I tried your advise but it does not work. I don't see any difference
>in your advise for the choose Formula Find/select and your
>suggestion for a procedure. I just use the topic find/select, give the
>information that I just want to select equal = 0. The selection is
>than all the emptyfields and the fields filled with -0-, this is for
>me an important difference.
>
The only difference is that the procedure statement contained the word "Select." They both were using the same formula. The sizeof( function tells you how many bytes of memory are being used to store the contents of the field or variable. If the cell is empty, there are no contents to store and no memory is used, so the result of that function will be 0. If it is not empty, but the value it contains is 0, then one byte of memory will be needed to store that 0 (eight bytes if it's floating point.) The parameter is the name of the field or variable you are interested in, and because you want to pass the name of the field to the function, rather than its value, you should put quotes around that name. If the field is named b, then
sizeof("b") = 0
is a test to see if the field is empty, and
sizeof("b") > 0
is a test to see if it is not empty.
b=0 AND sizeof("b") > 0
would be a test to see if its value is zero and it is also not empty. Before I posted my answer, I tested the code with international settings set for Netherlands. It worked fine for me whether or not I had U.S. Procedures and Formulas checked in the Design sheet.
This cannot be done with Find/Select... because there is no way to use a function with that dialog. You must either use the Formula Find/Select... dialog, or you must do it in a procedure.
Dave
More information about the Qna
mailing list