Hi all;<BR><BR>I have several form fields used in a serach that I use to create an SQL string. What I would like to do is create a SELECT statement that only checks columns if the appropriate form field has data.<BR><BR>Field1=Something<BR>Field2=<BR>Field3 =More<BR>Field4=Red<BR><BR>Then I would have my SELECT:<BR><BR>Select * from table where col1=Field1 AND col3=Field3 AND col4=Field4<BR><BR>Do I have to do something like: (.. for spacing)<BR><BR>If Field1&#060;&#062;"" Then<BR>..SQL = SQL & col1 = Field1<BR>End If<BR>If Field2&#060;&#062;"" Then<BR>..SQL = SQL & col2 = Field2<BR>End If<BR><BR>...etc<BR><BR>Or is there a better way?<BR><BR>Thanks!