请帮我翻译一下VB的语句吧Private Sub Command1_Click() Dim mrc As ADODB.Recordset Dim MsgText As String Dim txtSQL As String If Not Testtxt(txtClassno.Text) Then MsgBox "请输入班号!", vbOKOnly + vbExclamation, "

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 02:14:47

请帮我翻译一下VB的语句吧Private Sub Command1_Click() Dim mrc As ADODB.Recordset Dim MsgText As String Dim txtSQL As String If Not Testtxt(txtClassno.Text) Then MsgBox "请输入班号!", vbOKOnly + vbExclamation, "
请帮我翻译一下VB的语句吧
Private Sub Command1_Click()
Dim mrc As ADODB.Recordset
Dim MsgText As String
Dim txtSQL As String

If Not Testtxt(txtClassno.Text) Then
MsgBox "请输入班号!", vbOKOnly + vbExclamation, "警告"
txtClassno.SetFocus
Exit Sub
End If

If Not Testtxt(comboGrade.Text) Then
MsgBox "请选择年级!", vbOKOnly + vbExclamation, "警告"
comboGrade.SetFocus
Exit Sub
End If

If Not Testtxt(txtDirector.Text) Then
MsgBox "请输入班主任姓名!", vbOKOnly + vbExclamation, "警告"
txtDirector.SetFocus
Exit Sub
End If

If Not Testtxt(txtClassroom.Text) Then
MsgBox "请输入教室房间号!", vbOKOnly + vbExclamation, "警告"
txtClassroom.SetFocus
Exit Sub
End If

If Not IsNumeric(Trim(txtClassno.Text)) Then
MsgBox "请输入数字!", vbOKOnly + vbExclamation, "警告"
Exit Sub
txtClassno.SetFocus
End If

txtSQL = "select * from class_Info "
Set mrc = ExecuteSQL(txtSQL, MsgText)
mrc.MoveFirst

While (mrc.EOF = False)
If (Trim(mrc.Fields(0)) = Trim(txtClassno.Text)) Then
MsgBox "班号已经存在,请重新输入班号!", vbOKOnly + vbExclamation, "警告"
Exit Sub
txtClassno.Text = ""
txtClassno.SetFocus
Else
mrc.MoveNext
End If
Wend

mrc.AddNew
mrc.Fields(0) = Trim(txtClassno.Text)
mrc.Fields(1) = Trim(comboGrade.Text)
mrc.Fields(2) = Trim(txtDirector.Text)
mrc.Fields(3) = Trim(txtClassroom.Text)
mrc.Update
mrc.Close
MsgBox "添加班级信息成功!", vbOKOnly + vbExclamation, "添加班级信息"



End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
comboGrade.AddItem "大学一年级"
comboGrade.AddItem "大学二年级"
comboGrade.AddItem "大学三年级"
comboGrade.AddItem "大学四年级"
'comboGrade.AddItem "高中二年级"
'comboGrade.AddItem "高中三年级"
End Sub

请帮我翻译一下VB的语句吧Private Sub Command1_Click() Dim mrc As ADODB.Recordset Dim MsgText As String Dim txtSQL As String If Not Testtxt(txtClassno.Text) Then MsgBox "请输入班号!", vbOKOnly + vbExclamation, "
私有潜水艇Command1_Click() 昏暗的mrc 作为ADODB.Recordset 黯淡MsgText 当串昏暗的txtSQL 作为串
如果没有Testtxt(txtClassno.Text) 然后MsgBox ",vbOKOnly + vbExclamation," txtClassno.SetFocus 出口潜水艇末端如果
如果没有Testtxt(comboGrade.Text) 然后MsgBox ",vbOKOnly + vbExclamation," comboGrade.SetFocus 出口潜水艇末端如果
如果没有Testtxt(txtDirector.Text) 然后MsgBox ",vbOKOnly + vbExclamation," txtDirector.SetFocus 出口潜水艇末端如果
如果没有Testtxt(txtClassroom.Text) 然后MsgBox ",vbOKOnly + vbExclamation," txtClassroom.SetFocus 出口潜水艇末端如果
如果没有IsNumeric(Trim(txtClassno.Text)) 然后MsgBox ",vbOKOnly + vbExclamation," 退出次级txtClassno.SetFocus 末端如果
txtSQL = "精选* 从class_Info" 设置mrc = ExecuteSQL(txtSQL,MsgText) mrc.MoveFirst
当(mrc.EOF = 假) 如果(Trim(mrc.Fields(0)) = Trim(txtClassno.Text)) 然后MsgBox ",vbOKOnly + vbExclamation," 退出次级txtClassno.Text = "" txtClassno.SetFocus mrc.MoveNext 末端如果走向
mrc.AddNew mrc.Fields(0) = Trim(txtClassno.Text) mrc.Fields(1) = Trim(comboGrade.Text) mrc.Fields(2) = Trim(txtDirector.Text) mrc.Fields(3) = Trim(txtClassroom.Text) mrc.Update mrc.Close MsgBox ",vbOKOnly + vbExclamation,"
末端潜水艇
私有潜水艇Command2_Click() 卸载我末端潜水艇
私有次级Form_Load() comboGrade.AddItem " comboGrade.AddItem " comboGrade.AddItem " comboGrade.AddItem " ' comboGrade.AddItem " ' comboGrade.AddItem " 末端潜水艇
怪怪的!哈哈!

请帮我翻译一下VB的语句吧Private Sub Command1_Click() Dim mrc As ADODB.Recordset Dim MsgText As String Dim txtSQL As String If Not Testtxt(txtClassno.Text) Then MsgBox 请输入班号!, vbOKOnly + vbExclamation, 请好心人帮我翻译一下下面的阿拉伯语吧 vb open系列语句用法详解哪位大侠帮我详细的说一下就是跟open语句有联系的 input output append write line这一系列的语句用法一,如何打开,如何写入,如何读取,如何覆盖,不覆盖写入,请说的详细点啊, you are ever in my effection帮我翻译一下,要语句通顺并且连贯的 我有一个vb程序,目的是:把一个给定数插到有序数列中,插入后数列仍然有序.我编写的插不进去数,谁能帮我看看,代码在下边,我的vb学得很烂,期待着你们能帮我看一下Private Sub Instert(a(),x As Sin 英语翻译请帮我翻译一下这个完整的句子 , 麻烦请帮我翻译一下“质检报告”的英文! 请帮我翻译一下的中文意思! 请哪位帮我翻译一下柳宗元的? 请帮我翻译一下 “所以这是写给你的” 请帮我翻译一下画直线的句子 lubov的中文意思是什么?请帮我翻译一下 请帮我翻译一下这个病历的内容谢谢! 请各位能看懂的帮我翻译一下,谢谢! 请帮我翻译一下skills-integ的意思, 帮我翻译一下英文,请高年级的帮我一下 请帮我翻译一下一段五笔文字nyjffhwrvbcwep,owftcspsuthhxrrys,qjgikyiyyytrt,yhwbigmfuceadf~~~~请帮我翻译一下,是用五笔写的,感觉有点凌乱,尽量看看吧!谢谢! 请帮我翻译一下 “绅士汇”吧