it's working if all the feilds is entered by user. i need a code that combine all the sql command. user may enter in the one field or two field or all the three fields. i need to search the database with one field query or two feild query or three feilds query.
i have try it with where help is a table & search-test is form & contract no,username & date of feild in database and forms.
where the help(table).cont_no(field) is equal or not equal to search-test(form name).cont_no(text box field)
SELECT *
FROM help
WHERE ( forms ! [search-test] ! cont_no = ''
OR help.cont_no = forms ! [search-test] ! cont_no )
AND ( forms ! [search-test] ! username = ''
OR help.username = forms ! [search-test] ! username )
AND ( forms ! [search-test] ! cbo_date = ''
OR help.DATE = forms ! [search-test] ! cbo_date );