【VB开源代码栏目提醒】:网学会员,鉴于大家对VB开源代码十分关注,论文会员在此为大家搜集整理了“FMSweep.frm”一文,供大家参考学习!
VERSION 5.00
Begin VB.Form FMSweep
Caption = "打扫"
ClientHeight = 1920
ClientLeft = 60
ClientTop = 345
ClientWidth = 4050
LinkTopic = "Form1"
ScaleHeight = 1920
ScaleWidth = 4050
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton ComdCancel
Caption = "取消"
Height = 495
Left = 2280
TabIndex = 3
Top = 1200
Width = 855
End
Begin VB.CommandButton ComdOK
Caption = "确定"
Height = 495
Left = 720
TabIndex = 2
Top = 1200
Width = 855
End
Begin VB.ComboBox CombRoomID
Height = 315
Left = 2040
TabIndex = 1
Top = 480
Width = 1455
End
Begin VB.Label LabelDate
Height = 255
Left = 3000
TabIndex = 4
Top = 120
Width = 975
End
Begin VB.Label Label1
Caption = "房间编号:"
Height = 375
Left = 600
TabIndex = 0
Top = 600
Width = 1095
End
End
Attribute VB_Name = "FMSweep"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub ComdCancel_Click()
Unload Me
End Sub
Private Sub ComdOK_Click()
Dim Str As String
If Me.CombRoomID.Text = "" Then
MsgBox "请选择房间编号!"
Exit Sub
End If
Str = "update RoomInfo set RoomState='打扫' where RoomID='" & Trim(Me.CombRoomID.Text) & "'"
g_DBConn.Execute Str
Unload Me
End Sub
Private Sub Form_Load()
Me.Top = (Screen.Height - Me.Height) / 2 '垂直方向居中
Me.Left = (Screen.Width - Me.Height) / 2 '水平方向居中
Me.LabelDate.Caption = Date
'从数据库中读取数据写入房间编号下拉列表框
Dim adoRs As New ADODB.Recordset
Dim DBStr As String
DBStr = "select RoomID from RoomInfo"
adoRs.Open DBStr, g_DBConn, adOpenStatic, adLockReadOnly
If adoRs.RecordCount > 0 Then
adoRs.MoveFirst
Do While Not adoRs.EOF
CombRoomID.AddItem adoRs.Fields(0).Value
adoRs.MoveNext
Loop
End If
adoRs.Close
Set adoRs = Nothing
End Sub
上一篇:
About_Unit.pas
下一篇:
儿童四肢皮肤挫伤采用美宝疮疡贴治疗的疗效