Hello Raj,
Try this
IF NOT EMPTY(thisform.txtProject.value) THEN
lcCondition1 = 'PROJECT = ' + CHR(34) + thisform.txtProject.value + CHR(34)
ENDIF
IF NOT EMPTY(thisform.txtCondition.value) THEN
lcCondition2 = 'CONTACT = ' + CHR(34) + thisform.txtCondition.value + CHR(34)
ENDIF
lcSQL = 'SELECT * from TABLE_NAME' + ;
IIF(not EMPTY(lcCondition1), ' WHERE ' + lcCondition1 + ;
IIF(not EMPTY(lcCondition2), ' AND ' + lcCondition2, SPACE(0)),;
IIF(not EMPTY(lcCondition2), ' WHERE ' + lcCondition2, SPACE(0)))
EXECSCRIPT(lcSQL)
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only