xztj = True
select case index
case 2
SQL = "select * from CTSReport where [" & Trim(Label1(1).Caption) & "] = #" & Combo1(1).Text & "#"
else case
SQL = "select * from CTSReport where [" & Trim(Label1(index).Caption) & "] = """ & Combo1(index).Text & """"
end select
Text2.Text = SQL
select case index
case 2
SQL = "select * from CTSReport where [" & Trim(Label1(1).Caption) & "] = #" & Combo1(1).Text & "#"
else case
SQL = "select * from CTSReport where [" & Trim(Label1(index).Caption) & "] = """ & Combo1(index).Text & """"
end select
Text2.Text = SQL