【VB开源代码栏目提醒】:以下是网学会员为您推荐的VB开源代码-exam_arrange.frm,希望本篇文章对您学习有所帮助。
VERSION 5.00
Begin VB.Form exam_arrange
Caption = "考场安排"
ClientHeight = 2445
ClientLeft = 60
ClientTop = 345
ClientWidth = 6270
ControlBox = 0 'False
LinkTopic = "Form1"
ScaleHeight = 2445
ScaleWidth = 6270
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "取消"
Height = 975
Left = 3480
TabIndex = 2
Top = 600
Width = 1935
End
Begin VB.CommandButton command1
Caption = "开始安排"
Height = 975
Left = 840
TabIndex = 0
Top = 600
Width = 1935
End
Begin VB.Label Label1
Caption = "正在生成……"
ForeColor = &H000000FF&
Height = 375
Left = 4920
TabIndex = 1
Top = 2040
Visible = 0 'False
Width = 1575
End
End
Attribute VB_Name = "exam_arrange"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
response = MsgBox("确定要进行考场安排吗?这需要一段时间", vbOKCancel + 32, "提示")
If response = vbOK Then
Label1.Visible = True
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
Set rsk = New ADODB.Recordset
Set rsa = New ADODB.Recordset
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\file.mdb;Persist Security Info=False"
sql = "select * from entrance"
rs.Open sql, cn, 1, 1
If rs.EOF = True Then
MsgBox "请先组织考生报名"
Else
sql = "select * from info_place"
rsk.Open sql, cn, 1, 1
If rsk.EOF = True Then
MsgBox "请先输入考场基本信息"
Else
sql = "select * from arrange"
rsa.Open sql, cn, 3, 2
Do While rsk.EOF <> True
If rs.EOF = True Then
exam_result.Show
Unload Me
End If
num = rsk("knum")
For i = 1 To num
If rs.EOF = True Then
Exit For
End If
rsa.AddNew
rsa("zkzh") = rs("zkzh")
rsa("name") = rs("name")
rsa("gentle") = rs("gentle")
rsa("photo") = rs("photo")
rsa("kname") = rsk("kname")
rsa("kaddr") = rsk("kaddr")
rsa("tname") = rs("tname")
rsa("ttime") = rs("ttime")
rsa("zwh") = i
rsa.Update
rs.MoveNext
Next
rsk.MoveNext
Loop
End If
End If
End If
End Sub
上一篇:
Ex9_9.frm
下一篇:
心力衰竭的中医证素及常见证型