求vb +access用户管理窗体代码
来源:百度知道 编辑:UC知道 时间:2024/06/29 23:27:48
我有原程序!这个是代码:
Option Explicit
Private Sub Command1_Click(Index As Integer)
Dim i As Integer
Select Case Index
Case Is = 0
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst
Case Is = 1
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast
Case Is = 2
Adodc1.Recordset.MoveFirst
Case Is = 3
Adodc1.Recordset.MoveLast
Case Is = 4
If Command1(4).Caption = "保存" Then
Adodc1.Recordset.MoveLast
For i = 0 To 6
Adodc1.Recordset.Fields(i) = Text1(i).Text
Adodc1.Recordset.Update
Next i
Adodc1.Refresh
Command1(4).Caption = "添加"
For i = 0 To 6
Command1(i).Enabled = True
Next i
Comman