Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

請問一個VB的問題

0 views
Skip to first unread message

尋夢園(B)*^O^Y

unread,
Jun 2, 2003, 11:14:56 PM6/2/03
to
有一程式碼如下
Private Sub Command3_Click()
Dim s As String
s = MsgBox("確定刪除這筆記錄嗎?", vbOKCancel, "刪除確定")

If s = 1 Then
Data1.Recordset.Delete
Data1.Recordset.MoveNext
If Data1.Recordset.RecordCount > 0 Then
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
End If
End If
Exit Sub

問題:
這是刪除資料庫資料的按鈕,
1.請問一下為什麼要有Data1.Recordset.MoveNext這一行呀?(不加會有什麼問題嗎?)

2.If Data1.Recordset.RecordCount > 0 Then
If Data1.Recordset.EOF Then
Data1.Recordset.MoveLast
End If
End If
這裡是要做什麼用的呀?(不加會有什麼問題嗎)

--
◎ [1;31m龍 [32m貓 [33m資 [34m訊 [35m天 [36m地 [0m( [1mbbs.mgt.ncu.edu.tw [0m)
◎[ [1;33;46mnaphuang [0m]From: 61-231-125-119.HINET-IP.hinet.net

0 new messages