If TextBox2.Text.Length > 0 Then If radio2B.Checked Then If wOK = True Then sql += " OR (生産者名 Like '%" & TextBox2.Text.Trim & "%')" Else sql += " WHERE (生産者名 Like '%" & TextBox2.Text.Trim & "&')" End If Else If wOK = True Then sql += " or (生産者名 Like '%" & TextBox2.Text.Trim & "%')" Else sql += " WHERE (生産者名 LIke '" & TextBox2.Text.Trim & "&')" End If End If wOK = True End If
If TextBox2.Text.Length > 0 Then If wOK = True Then sql += " OR " Else sql += " WHERE " End If sql += " (生産者名 Like '" If radio2B.Checked Then sql += "%" End If sql += TextBox2.Text.Trim & "&')" wOK = True End If