图45 运行的投诉管理子窗体 以下为窗体的代码: Private Sub Command1_Click() On Error GoTo adderr Text1.SetFocus Adodc1.Recordset.AddNew Exit Sub adderr: MsgBox Err.Description End Sub Private Sub Command2_Click() On Error GoTo deleteerr With Adodc1.Recordset If Not .EOF And Not .BOF Then If MsgBox(\删除当前记录吗?\
.Delete
.MoveNext
If .EOF Then .MoveLast
End If
End If End With Exit Sub deleteerr: MsgBox Err.Description End Sub Private Sub Command3_Click() Adodc1.Recordset.MovePrevious If Adodc1.Recordset.BOF Then MsgBox \这是第一条记录\Adodc1.Recordset.MoveFirst End If End Sub Private Sub Command4_Click() Adodc1.Recordset.MoveNext If Adodc1.Recordset.EOF Then MsgBox \这是最后一条记录\Adodc1.Recordset.MoveLast
End If
End Sub
Private Sub Command5_Click()
If Adodc1.Recordset.EOF Then
MsgBox \记录空\End Else Adodc1.Recordset.MoveFirst End If Exit Sub End Sub Private Sub Command6_Click() If Adodc1.Recordset.RecordCount = 0 Then MsgBox \空记录\End Else Adodc1.Recordset.MoveLast End If End Sub Private Sub Command7_Click() MDIForm1.Show frmtousu.Hide
End Sub
到这里,各个窗体的界面和代码都介绍完了。发布后可以作为一个实际的项目应用。
Copyright 2007 www.zhujiangroad.com All Rights Reserved.
珠江路在线 版权所有 苏ICP备05016148号
关于我们广告服务付款方式南京地图 珠江路在线网络电话:84065370 传真:86983769 QQ:58667443 广告:13813822567