A query launched via pushbutton from a form reads (shortened below)
It functions perfectly until it begins to parse the logical fields which are activated by check boxes on the form. The check boxes have the values "TRUE" and " " (void)
The syntax error is "error incompatible types" How would the parameters for a logical field read?
Identifying stExec as String reports that there is no field "False" in mainrol.db. I must have missed one check box when I altered the unchecked value to void, but it is passing the value as the field name.
Changing the input to a labeled field (enter "TRUE") will probably work, but I'd like to know how to handle a logical field. Any thoughts appreciaated.
method pushButton(var eventInfo Event)
var
stNAME String
stExec Logical
quQuery Query
tvResults tableView
endvar
stName = fldname'value
stExec = fldExec'Value
if StNAME.isBlank() then
StNAME = "Check"
else
StNAME = "Check " + StNAME
endif
if stExec.isBlank() then
stExec = "Check"
else
stExec = "Check " + StNAME
endif
Query
ANSWER: :WORK:Results.db
mainrol.db | Name | Exec |
| ~stName | ~stExec |
endquery
errorTrapOnWarnings(Yes)
quQuery.writeQBE(":Work:SearchQuery.QBE")
try
quQuery.executeQBE()
tvResults.open(":WORK:results.DB")
tvResults.wait()
tvResults.close()
onFail
errorShow()
msgStop("", "")
endTry
errorTrapOnWarnings(No)
endMethod