📄 form_higherupcolist.frm
字号:
VERSION 5.00
Begin VB.Form Frm_HigherUpCoList
BorderStyle = 1 'Fixed Single
Caption = "上级单位"
ClientHeight = 1875
ClientLeft = 3840
ClientTop = 3075
ClientWidth = 4380
Icon = "Form_HigherUpCoList.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1875
ScaleWidth = 4380
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command1
Caption = "取消&C"
Height = 315
Index = 1
Left = 2280
TabIndex = 7
Top = 1410
Width = 1155
End
Begin VB.CommandButton Command1
Caption = "确定&D"
Height = 315
Index = 0
Left = 690
TabIndex = 6
Top = 1410
Width = 1155
End
Begin VB.TextBox Text1
Height = 285
Index = 2
Left = 1350
MaxLength = 20
TabIndex = 5
Top = 900
Width = 2595
End
Begin VB.TextBox Text1
Height = 285
Index = 1
Left = 1350
MaxLength = 15
TabIndex = 4
Top = 510
Width = 1965
End
Begin VB.TextBox Text1
Height = 285
Index = 0
Left = 1350
MaxLength = 4
TabIndex = 3
Top = 120
Width = 1785
End
Begin VB.Label Label1
Caption = "备注:"
Height = 225
Index = 2
Left = 240
TabIndex = 2
Top = 900
Width = 855
End
Begin VB.Label Label1
Caption = "名称:"
Height = 315
Index = 1
Left = 240
TabIndex = 1
Top = 480
Width = 855
End
Begin VB.Label Label1
Caption = "编码:"
Height = 255
Index = 0
Left = 240
TabIndex = 0
Top = 150
Width = 855
End
End
Attribute VB_Name = "Frm_HigherUpCoList"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click(Index As Integer)
Dim Ssql As String
On Error GoTo err_exit
If Index = 1 Then Unload Me: Exit Sub
If Trim(Text1(0).Text) = "" Then MsgBox "编号不能为空! ", 16: Text1(0).SetFocus: Exit Sub
If Trim(Text1(1).Text) = "" Then MsgBox "名称不能为空! ", 16: Text1(1).SetFocus: Exit Sub
If Text1(0).Tag = 1 Then
Ssql = "insert into " & Me.Tag & ".dbo.GY_HigherUpCo(code,name,Remark) VALUES( '" & Trim(Text1(0).Text) _
& "','" & Trim(Text1(1).Text) & "','" & Trim(Text1(2).Text) & "')"
End If
If Text1(0).Tag = 2 Then
Ssql = "update " & Me.Tag & ".dbo.GY_HigherUpCo set code='" & Trim(Text1(0).Text) _
& "',name='" & Trim(Text1(1).Text) & "',Remark='" & Trim(Text1(2).Text) & "'" _
& " WHERE CODE='" & Trim(Text1(1).Tag) & "'"
End If
Conn_System.Execute Ssql
Unload Me
Exit Sub
err_exit:
MsgBox Err.Description, 16
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -