Creating A String Containing SQL Select Command Assuming the rating is selected from a list box: dim strSQL as string = select * from customer where rating = ' strSQL = strSQL & ListBox1.SelectedItem & '
{}