📄 form2.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Begin VB.Form Form2
Caption = "基本环境信息添加"
ClientHeight = 3405
ClientLeft = 60
ClientTop = 450
ClientWidth = 8280
LinkTopic = "Form2"
ScaleHeight = 3405
ScaleWidth = 8280
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc2
Height = 375
Left = 720
Top = 3000
Visible = 0 'False
Width = 1815
_ExtentX = 3201
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc2"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 6120
TabIndex = 15
Top = 2640
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "添加"
Height = 495
Left = 4440
TabIndex = 14
Top = 2640
Width = 1335
End
Begin VB.TextBox Text7
Height = 495
Left = 5520
TabIndex = 12
Top = 1680
Width = 1455
End
Begin VB.TextBox Text6
Height = 495
Left = 5520
TabIndex = 10
Top = 960
Width = 1455
End
Begin VB.TextBox Text5
Height = 495
Left = 5520
TabIndex = 8
Top = 240
Width = 1455
End
Begin VB.TextBox Text4
Height = 495
Left = 2040
TabIndex = 6
Top = 2400
Width = 1455
End
Begin VB.TextBox Text3
Height = 495
Left = 2040
TabIndex = 4
Top = 1680
Width = 1455
End
Begin VB.TextBox Text2
Height = 495
Left = 2040
TabIndex = 2
Top = 960
Width = 1455
End
Begin VB.TextBox Text1
Height = 495
Left = 2040
TabIndex = 0
Top = 240
Width = 1455
End
Begin VB.Label Label7
Caption = $"Form2.frx":0000
Height = 495
Left = 3840
TabIndex = 13
Top = 1920
Width = 1695
End
Begin VB.Label Label6
Caption = $"Form2.frx":0018
Height = 495
Left = 3840
TabIndex = 11
Top = 1200
Width = 1695
End
Begin VB.Label Label5
Caption = $"Form2.frx":0030
Height = 495
Left = 3960
TabIndex = 9
Top = 480
Width = 1695
End
Begin VB.Label Label4
Caption = $"Form2.frx":0044
Height = 495
Left = 480
TabIndex = 7
Top = 2520
Width = 1695
End
Begin VB.Label Label3
Caption = $"Form2.frx":005A
Height = 495
Left = 480
TabIndex = 5
Top = 1920
Width = 1695
End
Begin VB.Label Label2
Caption = $"Form2.frx":0070
Height = 495
Left = 360
TabIndex = 3
Top = 1200
Width = 2055
End
Begin VB.Label Label1
Caption = "年份:"
Height = 495
Left = 1440
TabIndex = 1
Top = 480
Width = 855
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
With Adodc2.Recordset
If Trim(Text1.Text) = "" Then
MsgBox "该处不能为空!", vbOKOnly + vbExclamation, "提示"
Text1.SetFocus
End If
.AddNew
!年份 = Trim(Text1.Text)
![废水排放量(万吨)] = Trim(Text2.Text)
![化学需氧量(吨)] = Trim(Text3.Text)
![氨氮排放量(吨)] = Trim(Text4.Text)
![二氧化硫(吨)] = Trim(Text5.Text)
![烟尘排放量(吨)] = Trim(Text6.Text)
![工业粉尘(吨)] = Trim(Text7.Text)
MsgBox "添加数据成功!", vbOKOnly + vbExclamation, ""
End With
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -