请帮忙看看这个程序哪 里错了 啊?
Private Sub search_material(ByVal s As String)Set rstemp = New adodb.Recordset
sqlconnection = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\jxc.mdb"
If Len(Trim(s)) > 0 Then
rstemp.Open "select * from WS A drawing num apply where name='" & Trim(s) & "'", sqlconnection, adOpenKeyset
If rstemp.RecordCount = 1 Then
Text2.Text = rstemp.Fields("drawing number")
End If
Else
rstemp.Open "select * from WS A drawing num apply", cnn, adOpenDynamic
If rstemp.RecordCount > 0 Then
rstemp.MoveFirst
Do While Not rstemp.EOF
Combo1.AddItem rstemp.Fields("drawing number")
rstemp.MoveNext
If rstemp.EOF Then
End If
Loop
End If
End If
rstemp.Close
Set rstemp = Nothing
End Sub
请帮忙看看这个程序哪 里错了 啊?