教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 精品文档 > 学前教育 >

《Visual Basic程序设计基础》习题参考答案(10)

来源:网络收集 时间:2026-05-15
导读: If Not Adodc2.Recordset.BOF And Adodc2.Recordset.Bookmark > 1 Then Adodc2.Recordset.MovePrevious Else Command1(3).Enabled = False: Command1(4).Enabled = False End If Case 2 If Not Adodc3.Recordset.BO

If Not Adodc2.Recordset.BOF And Adodc2.Recordset.Bookmark > 1 Then Adodc2.Recordset.MovePrevious Else

Command1(3).Enabled = False: Command1(4).Enabled = False End If Case 2

If Not Adodc3.Recordset.BOF And Adodc3.Recordset.Bookmark > 1 Then Adodc3.Recordset.MovePrevious Else

Command1(3).Enabled = False: Command1(4).Enabled = False End If End Select

Command1(5).Enabled = True: Command1(6).Enabled = True

Case 5

Select Case SSTab1.Tab Case 0

If Not Adodc1.Recordset.EOF And _

Adodc1.Recordset.Bookmark < Adodc1.Recordset.RecordCount Then

Adodc1.Recordset.MoveNext Else

Command1(5).Enabled = False: Command1(6).Enabled = False End If Case 1

If Not Adodc2.Recordset.EOF And _

Adodc2.Recordset.Bookmark < Adodc2.Recordset.RecordCount Then

Adodc2.Recordset.MoveNext Else

Command1(5).Enabled = False: Command1(6).Enabled = False End If Case 2

If Not Adodc3.Recordset.EOF And _

Adodc3.Recordset.Bookmark < Adodc2.Recordset.RecordCount Then

Adodc3.Recordset.MoveNext Else

Command1(5).Enabled = False: Command1(6).Enabled = False End If End Select

Command1(3).Enabled = True: Command1(4).Enabled = True

Case 6

Select Case SSTab1.Tab

Case 0: Adodc1.Recordset.MoveLast Case 1: Adodc2.Recordset.MoveLast Case 2: Adodc3.Recordset.MoveLast End Select

Command1(6).Enabled = False: Command1(5).Enabled = False Command1(4).Enabled = True: Command1(3).Enabled = True

Case 7 Unload Me End Select

If Not Adodc1.Recordset.EOF Then Text1.Text = Adodc1.Recordset(\学号\If Not Adodc2.Recordset.EOF Then Text5.Text = Adodc2.Recordset(\课程号\If Not Adodc3.Recordset.EOF Then

Text11.Text = Adodc3.Recordset(\学号\ Text12.Text = Adodc3.Recordset(\课程号\End If Exit sub errshow:

MsgBox Err.Description End Sub

Private Sub SSTab1_Click(PreviousTab As Integer)

If Not Adodc1.Recordset.EOF Then Text1.Text = Adodc1.Recordset(\学号\If Not Adodc2.Recordset.EOF Then Text5.Text = Adodc2.Recordset(\课程号\If Not Adodc3.Recordset.EOF Then

Text11.Text = Adodc3.Recordset(\学号\ Text12.Text = Adodc3.Recordset(\课程号\End If End Sub

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) Dim xh As String

If KeyCode = vbKeyReturn Then

rn = Adodc1.Recordset.Bookmark: Adodc1.Recordset.MoveFirst Adodc1.Recordset.Find \学号='\ If Adodc1.Recordset.EOF Then

Adodc1.Recordset.Bookmark = rn: xh = Adodc1.Recordset(\学号\ Adodc1.Recordset (\学号\ Adodc3.Recordset.MoveFirst Do

Adodc3.Recordset.Find \学号='\

If Not Adodc3.Recordset.EOF Then

Adodc3.Recordset (\学号\ Else Exit Do End If Loop

Adodc3.Recordset.MoveFirst: SendKeys \ Else

MsgBox \学号重号,重新输入!\输入验证!\

Adodc1.Recordset.Bookmark = rn : vlt = False: Text1.SelStart = 0 Text1.SelLength = Len(Text1.Text) End If End If End Sub

Private Sub Text1_Validate(Cancel As Boolean) If vlt = True Then Cancel = False Else

MsgBox \学号重号,重新输入!\输入验证!\Cancel = True End If End Sub

Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer) Dim kch As String

If KeyCode = vbKeyReturn Then

rn = Adodc2.Recordset.Bookmark: Adodc2.Recordset.MoveFirst Adodc2.Recordset.Find \课程号='\ If Adodc2.Recordset.EOF Then

Adodc2.Recordset.Bookmark = rn: kch = Adodc2.Recordset(\课程号\ Adodc2.Recordset (\课程号\= Text5.Text: Adodc3.Recordset.MoveFirst Do

Adodc3.Recordset.Find \课程号='\ If Not Adodc3.Recordset.EOF Then

Adodc3.Recordset(\课程号\ Else Exit Do End If Loop

Adodc3.Recordset.MoveFirst: SendKeys \

Else

MsgBox \课程号重号,重新输入!\输入验证!\

Adodc2.Recordset.Bookmark = rn: vlt = False: Text5.SelStart = 0 Text5.SelLength = Len(Text5.Text) End If End If End Sub …… 此处隐藏:1336字,全部文档内容请下载后查看。喜欢就下载吧 ……

《Visual Basic程序设计基础》习题参考答案(10).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wendang/598753.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)