You need to get fancier to do the search. LIKE isn't terribly useful in numeric searches. You'd probably want the user to find numeric values that are exactly =, >, >=, <, <= or in a range.
For doing these kind of generic search pages, you will want to keep the field type handy and display different inputs to the user for filtering. If they select a text based field you can leave it as is, or get a little fancier and add on dropdownlist with Contains, Starts With, Matches Exactly Then you can write the appropriate filter string Contains: what you have now Starts with: rblSearchBy.SelectedValue.ToString & " LIKE '%" & SearchText.Text.Trim & "'" Matches Exactly: rblSearchBy.SelectedValue.ToString & " ='" & SearchText.Text.Trim & "'" If they select a numeric data field, display a dropdownlist with =, >, >=, <, <= or Range. If they select range, you'll also want to display another text box Then write the appropriate filter string. =: rblSearchBy.SelectedValue.ToString & " ='" & SearchText.Text.Trim >: rblSearchBy.SelectedValue.ToString & " >'" & SearchText.Text.Trim you get the idea range: rblSearchBy.SelectedValue.ToString & " >='" & SearchText.Text.Trim & " and " & rblSearchBy.SelectedValue.ToString & " <='" & SearchText2.Text.Trim Then you can do something similar for dates. HTH, -- Dean Fiala Very Practical Software, Inc http://www.vpsw.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/