strsql1 = "select*from sq where 始发港='" & a & "' and 目的港='" & b & "' "
Where 换成AND
strsql1 = "select*from sq where 始发港='" & a & "'where目的港='" & b & "' "
为什么一个select 语句里面有两个where,而且第二个where后面没有空格。
第二个where应该改为 and或者or 还有后面要加空格。
strsql1 = "select*from sq where 始发港='" & a & "'where目的港='" & b & "' "
改成 strsql1 = "select * from sq where 始发港='" & a & "'where 目的港='" & b & "' "
a,b同时满足条件:strsql1 = "select * from sq where 始发港='" & a & "' and 目的港='" & b & "' "
a,b一个满足条件:strsql1 = "select * from sq where 始发港='" & a & "' Or 目的港='" & b & "' "