📄 frmxuqianno.frm
字号:
VERSION 5.00
Begin VB.Form frmXuQianNo
Caption = "请输入续签合同编号"
ClientHeight = 2880
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 2880
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "进 入 续 签"
Height = 495
Left = 1920
TabIndex = 2
Top = 1680
Width = 1335
End
Begin VB.TextBox Text1
Height = 495
Left = 1920
TabIndex = 1
Top = 720
Width = 2295
End
Begin VB.Label Label1
Caption = "续签合同编号"
Height = 255
Left = 480
TabIndex = 0
Top = 840
Width = 1215
End
End
Attribute VB_Name = "frmXuQianNo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "请输入要续签的合同编号", vbOKOnly + vbInformation, "注意"
Text1.SetFocus
Exit Sub
End If
Dim sqlcon As String
Dim rs_con As New ADODB.Recordset
sqlcon = "select * from Contract where 合同编号 = '" & Text1.Text & "'"
rs_con.Open sqlcon, conn, adOpenStatic, adLockOptimistic
'如果输入的合同编号不存在,退出,要求重新输入
If rs_con.EOF = True Then
MsgBox "输入的合同编号不存在!", vbOKOnly + vbInformation, "注意"
'调用frmXuQianNo窗体,重新输入合同编号
rs_con.Close
Text1.Text = ""
Text1.SetFocus
Exit Sub
End If
'打开续签窗体
frmXuQian.Show
rs_con.Close
Unload Me
End Sub
Private Sub Form_Load()
Dim X0 As Long
Dim Y0 As Long
'让窗体居中
X0 = Screen.Width
Y0 = Screen.Height
X0 = (X0 - Me.Width) / 2
Y0 = (Y0 - Me.Height) / 2
Me.Move X0, Y0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -