📄 frmsushe1.frm
字号:
VERSION 5.00
Begin VB.Form frmsushe1
BackColor = &H00FFFFFF&
BorderStyle = 1 'Fixed Single
Caption = "录入住宿资料"
ClientHeight = 1215
ClientLeft = 45
ClientTop = 435
ClientWidth = 2985
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1215
ScaleWidth = 2985
Begin VB.CommandButton CmdOK
Caption = "确认"
Default = -1 'True
Height = 375
Left = 120
TabIndex = 2
Top = 720
Width = 1050
End
Begin VB.CommandButton CmdQuit
Cancel = -1 'True
Caption = "返回"
Height = 375
Left = 1785
TabIndex = 1
Top = 720
Width = 1050
End
Begin VB.ComboBox coblive
Height = 300
Left = 1200
TabIndex = 0
Text = "coblive"
Top = 240
Width = 1695
End
Begin VB.Label Label1
BackColor = &H00FFFFFF&
Caption = "选择宿舍:"
Height = 360
Left = 120
TabIndex = 3
Top = 240
Width = 945
End
End
Attribute VB_Name = "frmsushe1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public fk As String
Private Sub CmdOK_Click()
Dim sCon As String
Dim scon1 As String
sCon = "select * from Room where 宿舍='" & coblive.Text & "'"
Set adoRS = adoCon.Execute(sCon)
If Not adoRS.EOF Then
MsgBox "编号为:" & Trim(coblive.Text) & "的宿舍资料已经存在!", vbOKOnly + vbExclamation, "系统提示"
coblive.SetFocus
Exit Sub
Else
fk = Trim(coblive.Text)
Unload Me
frmsushe2.Show
End If
End Sub
Private Sub cmdQuit_Click()
Unload Me
End Sub
Private Sub Form_Load()
Me.Width = 3075
Me.Height = 1695
Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2 - 800
Me.Show
coblive.SetFocus
'宿舍
Set adoRS = adoCon.Execute("Select Name From Live Order By Name")
coblive.Clear
Do While Not adoRS.EOF
coblive.AddItem Trim(adoRS("Name"))
adoRS.MoveNext
Loop
coblive.ListIndex = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -