|
3#
楼主 |
发表于 2003-6-20 19:40:00
|
只看该作者
谢谢Tom-hyq,小弟水平较底。请教Tom_hyq以下代码我看不太懂,可以帮忙解释一下吗(转Trynew的)
Private Sub 删除_Click()
Dim cnndb As New ADODB.Connection
Dim rstobject As New ADODB.Recordset
Set cnndb = CurrentProject.Connection
rstobject.Open "order1", cnndb, , adLockOptimistic
With rstobject
.Find "[orderno] = '" & Me.List & "'"
If .EOF Then
Debug.Print "Don't find."
Else
.Delete
.MoveFirst
Do Until .EOF
.MoveNext
Loop
End If
.Close
End With
Me.List.Requery
Set rstobject = Nothing
cnndb.Close
Set cnndb = Nothing
End Sub
可以改成我问的那个吗?如果year我在一个输入框里的,应该怎么做了 |
|