?? 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 + -