I’m using the execute statement for the first time building a multi=field Find/Select statement. It seems to work as long as all the fields are text type. But I have a stockno field that is numeric and is giving me grief.
I initialize (in .Initialize) a fileglobal srchstockno to “”. On a form I have a textedit superobject to capture the variable srchstockno The option to use the real StockNo field’s attributes is ON. StockNo is numeric with no decimals. I put 89450 in the TDSO and enter a the procedure that’s building the formula. Like myexc = "Select StockNo contains " + srchstockno. When I message it, it says, Select StockNo contains 89450. I copied the code in the pdf reference for execute that tests for error and get an A-OK. It says Select StockNo contains 89450 But when I run it, I get a type mismatch, Numeric used when text was expected.
I could change my construction to say Select Str(StockNo) contains “89450” if that is necessary.
I’m guessing that if I have to select/find on a date field, I’ll have similar grief.
So my construction of formula works great with multiple text type fields - the variables Find, Select, OR, AND lay in as they should. Works great. What’s the trick to building a formula that with EXECUTE a CONTAINS on a numeric field?
I tried the same contains in the regular Find/select dialog under the Search Menu and Panorama was happy with that