|
xingzhihao 发表于 2011-12-4 15:12
这个不错,但是如何加入条件呢(例如:联系人叫“李娜”)?我反复修改,不得要领。各位高人,指点一下。
...
呵呵,斑竹的东西理应他告诉你.这样,我替斑竹说了
If mlngCurrentPage = 1 Then
strSQL = "SELECT TOP " & lngPageSize & " * FROM tblCustomers where Linkman='李娜' ORDER BY Id"
Else
strSQL = "SELECT TOP " & lngPageSize & " * FROM tblCustomers WHERE " & _
"Id>(SELECT Max(Id) FROM (SELECT TOP " & lngPageSize * (mlngCurrentPage - 1) & " Id FROM tblCustomers where Linkman='李娜' )) " & _
" ORDER BY Id;"
End If
|
|