VB 利用combo1 和combo2的值 查找出数据库中所有在combo1和combo2范围之间的sz的记录 代码?
SetCON=NothingSetrst1=NothingCON.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;D...
Set CON = Nothing
Set rst1 = Nothing
CON.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db1.mdb;Persist Security Info=False"
CON.CursorLocation = adUseClient
CON.Open
mysql = "select * szky where sz='" & Combo1.Text & "' and sz='" & Combo2.Text & "' "
rst1.Open mysql, CON, adOpenKeyset, adLockOptimistic 展开
Set rst1 = Nothing
CON.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db1.mdb;Persist Security Info=False"
CON.CursorLocation = adUseClient
CON.Open
mysql = "select * szky where sz='" & Combo1.Text & "' and sz='" & Combo2.Text & "' "
rst1.Open mysql, CON, adOpenKeyset, adLockOptimistic 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询