📄 unit.frm
字号:
VERSION 5.00
Begin VB.Form unit
Caption = "单位自定义"
ClientHeight = 1680
ClientLeft = 4365
ClientTop = 4860
ClientWidth = 4515
Icon = "unit.frx":0000
LinkTopic = "unit"
ScaleHeight = 1680
ScaleWidth = 4515
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 3000
TabIndex = 3
Top = 840
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 3000
TabIndex = 2
Top = 240
Width = 1335
End
Begin VB.TextBox txt_fac_unit
Height = 375
Left = 240
TabIndex = 1
Top = 840
Width = 2175
End
Begin VB.Label Label1
Caption = "请输入您所使用的单位:"
Height = 375
Left = 240
TabIndex = 0
Top = 240
Width = 2295
End
End
Attribute VB_Name = "unit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Sql As String
Dim RS As ADODB.Recordset
Private Sub Command1_Click()
'新建单位入库
Sql = "select unit from [unit] where unit='" & txt_fac_unit.Text & "'"
Set RS = dbSelect(Sql)
If RS.EOF Then
Sql = "insert into [unit] values('" & Trim(txt_fac_unit.Text) & "')"
dbOperate Sql
Unload Me
Else
MsgBox "此单位已添加!"
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -