Private Sub Command1_Click()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim r2 As New ADODB.Recordset
Dim cnb As New ADODB.Connection
Dim cstring As String
cstring = "rovider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\文件\程序\小程序\db1.mdbersist Security Info=False"
If Combo1.Text = "编号" Then
Set cn = New ADODB.Connection
cn.Open cstring
Set r2 = New ADODB.Recordset
With r2
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.Open "select * from table1 where 编号=" & Text1.Text, cn, adOpenDynamic, adLockOptimistic
Private Sub Command1_Click()
Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim r2 As New ADODB.Recordset
Dim cnb As New ADODB.Connection
Dim cstring As String
cstring = "rovider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\文件\程序\小程序\db1.mdbersist Security Info=False"
If Combo1.Text = "编号" Then
Set cn = New ADODB.Connection
cn.Open cstring
Set r2 = New ADODB.Recordset
With r2
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.Open "select * from table1 where 编号=" & Text1.Text, cn, adOpenDynamic, adLockOptimistic