Now I get a unrecognized command verb on the line with the
SELECT * FROM historian
WHERE &criteria INTO CURSOR cfoundhistrecs
SELECT cfoundhistrecs
SET SAFETY OFF
COPY TO temp
SET SAFETY ON
DO FORM search_historian
put the statement together then wrtie the varible that is holding everything to a file (text file). then you can do a modi file on it to review it for syntax. then copy it to memory, go to command window and try it out. Attitude is Everything
The reason I stated using "AND ;" + CHR(13) is because if the statement gets too long, you will get an error. It will also be more readable when debugging.
Ok. I debugged the statement as best I could without having a form with your checkboxes on it. Note that there are a lot of differences between your prior statements and this one. I didn't even notice the other IF tests you were leaving out from yesterdays banter:
Copied it verbatim and it compiled ok but as soon as you try to do a search on more then one field it gives you the missing operand. I am sorry this is such a pain in the a@@. I have been spending to much time on this and I know you have all been trying hard to assist me in it. thank you.
this is a method I use when ever I have a large and mulitable build of macro substitution and I keep getting errors. I write the macro out to a text file, that way I can view the actual code I think I am getting. also I can use copy and paste to the command window to try the code. Attitude is Everything
It needs to be removed, just leave these lines like:
" lcphotographer $(UPPER(historian.photo_take)) "
" lcdate_aquired $(UPPER(historian.date_aquir)) "
The missing operand problem is that the '=' is trying to get a value assigned instead of just using the substring search ($) function.
I know that was in the code previously, but somehow it got omitted. The IF !EMPTY(criteria) section should deal with criteria being empty after the first IF though. Would you put in a break point and copy/paste the value of criteria? Just before the SELECT statement, SET STEP ON or just put a breakpoint in the debugger. Then in the command window, use this line:
_CLIPTEXT = criteria
Then, paste the result in this forum so I/we can see it.
STILL DOING THE OPERAND ERROR. HERE IS ALL THE CODE IN THE COMMAND BUTTON::::::::::: I mean if you search on any one field it works great but as soon as you try to do it by two it gives the missing operand
Since you expand the macro at runtime, I don't know the reason for the embedded ;'s and CRLF's. I believe these would only be needed if you were writing the code out to a text file and then compiling it.
Change all the (3 in the code above):
criteria = criteria + " AND ;" + CRLF
To:
criteria = criteria + " AND "
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.