I have a couple of forms that use the Keyword code to look up information in 
tables and with double click bring them up in another form.
I noticed if my table has an INTEGER column that I want to be part of the 
possibilities it will not work because the LIKE command only looks at TEXT.
I understand I can use CTXT to change into text. How do I change the below code 
to use and Integer column?
The problem column is Invoicenumber which is an INTEGER type.

GETPROPERTY Keyword TEXTVALUE vKeyword
IF vKeyword = '*' OR vKeyword = '%' THEN
   -- Define Where Clause
   SET VAR vWhereClause = ('Control# IS NOT NULL')
   PROPERTY LV_Quotes REFRESHLIST 'TRUE'
   PROPERTY LV_Quotes SET_FOCUS 'TRUE'
   PROPERTY ExportResultsAs ENABLED 'TRUE'
   GOTO Done
ENDIF
IF (SLEN (.vKeyword )) < 4 THEN
  GOTO Done
ENDIF
   SET VAR vQuotes = (CVAL('QUOTES'))
   SET VAR vMany = (CVAL('MANY'))
--   SET VAR vSingle = (CVAL('SINGLE'))
   SET VAR vSearchString TEXT = NULL
   SET VAR vWhereClause TEXT = NULL
   SET VAR vSearchString = (.vQuotes+.vKeyword+.vMany+.vQuotes)
   -- Define Where Clause
   SET VAR vWhereClause = +
   ('Control# LIKE'&.vSearchString&'OR ' + +
    'InvoiceNumber LIKE'&.vSearchString&'OR ' + +
    'OrderNumber LIKE'&.vSearchString&'OR ' + +
    'ShipZip LIKE'&.vSearchString)
   PROPERTY LV_Quotes REFRESHLIST 'TRUE'
LABEL Done
CLEAR VAR iv%
RETURN

James Belisle

Making Information Systems People Friendly Since 1990
[cid:[email protected]]

Reply via email to