📄 frm_spwxinfo.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Frm_spwxinfo
Caption = "设备维修信息登记"
ClientHeight = 6945
ClientLeft = 60
ClientTop = 450
ClientWidth = 9120
Icon = "Frm_spwxinfo.frx":0000
LinkTopic = "Form1"
ScaleHeight = 6945
ScaleWidth = 9120
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command3
Caption = "取 消"
Enabled = 0 'False
Height = 375
Left = 7845
TabIndex = 17
Top = 105
Width = 1065
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "Frm_spwxinfo.frx":0CCA
Height = 4950
Left = 105
TabIndex = 16
Top = 1890
Width = 8940
_ExtentX = 15769
_ExtentY = 8731
_Version = 393216
AllowUpdate = -1 'True
HeadLines = 1
RowHeight = 15
AllowAddNew = -1 'True
AllowDelete = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 1680
Top = 7035
Width = 4845
_ExtentX = 8546
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\毕业设计\TIZIANO.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\毕业设计\TIZIANO.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from tab_设备维修"
Caption = "Adodc1"
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.Frame Frame1
Caption = "设备维修登记"
Height = 1665
Left = 120
TabIndex = 1
Top = 120
Width = 7515
Begin VB.TextBox Text6
DataField = "维修结果"
Enabled = 0 'False
Height = 300
Left = 945
TabIndex = 5
Top = 1155
Width = 6360
End
Begin VB.TextBox Text1
DataField = "编码"
Enabled = 0 'False
Height = 300
Left = 945
TabIndex = 0
Top = 315
Width = 1725
End
Begin VB.TextBox Text3
DataField = "负责人"
Enabled = 0 'False
Height = 300
Left = 5985
TabIndex = 2
Top = 300
Width = 1335
End
Begin VB.TextBox Text4
DataField = "维修金额"
Enabled = 0 'False
Height = 300
Left = 945
TabIndex = 3
Top = 735
Width = 1710
End
Begin VB.TextBox Text5
DataField = "维修用料"
Enabled = 0 'False
Height = 300
Left = 3885
TabIndex = 4
Top = 735
Width = 3420
End
Begin VB.TextBox Text2
DataField = "设备编号"
Enabled = 0 'False
Height = 300
Left = 3870
TabIndex = 9
Top = 300
Width = 1200
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "维修结果:"
Height = 180
Left = 120
TabIndex = 15
Top = 1215
Width = 900
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "维修金额:"
Height = 180
Left = 120
TabIndex = 14
Top = 795
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "维修编号:"
Height = 180
Left = 120
TabIndex = 13
Top = 360
Width = 900
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "设备编号:"
Height = 180
Left = 2940
TabIndex = 12
Top = 360
Width = 900
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "负责人:"
Height = 180
Left = 5205
TabIndex = 11
Top = 360
Width = 720
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "维修用料:"
Height = 180
Left = 2940
TabIndex = 10
Top = 795
Width = 900
End
End
Begin VB.CommandButton Command1
Caption = "删 除"
Height = 375
Left = 7845
TabIndex = 6
Top = 525
Width = 1065
End
Begin VB.CommandButton Command2
Caption = "保 存"
Height = 375
Left = 7845
TabIndex = 7
Top = 945
Width = 1065
End
Begin VB.CommandButton Command4
Caption = "返 回"
Height = 375
Left = 7845
TabIndex = 8
Top = 1365
Width = 1065
End
End
Attribute VB_Name = "Frm_spwxinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.Recordset.Delete
Adodc1.Refresh
Adodc1.RecordSource = "select * from tab_设备维修"
Adodc1.Refresh
End Sub
Private Sub Command2_Click()
With Adodc1.Recordset
.AddNew
.Fields("编码") = Trim(Text1.Text)
.Fields("设备编号") = Trim(Text2.Text)
.Fields("负责人") = Trim(Text3.Text)
.Fields("维修金额") = Trim(Text4.Text)
.Fields("维修用料") = Trim(Text5.Text)
.Fields("维修结果") = Trim(Text6.Text)
.Update
End With
Adodc1.RecordSource = "select * from tab_设备维修"
Adodc1.Refresh
Call clear
Text1.SetFocus
End Sub
Private Sub clear()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
End Sub
Private Sub Command3_Click()
Call clear
Command3.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Adodc1.Recordset.CancelUpdate
Text1.SetFocus
End Sub
Private Sub Command4_Click()
'Adodc1.Recordset.CancelUpdate
Unload Me
End Sub
Private Sub Form_Load()
Text1.Enabled = True
End Sub
Private Sub Text1_Change()
Command3.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Text6.Enabled = True
End Sub
Private Sub Text1_GotFocus()
Adodc1.RecordSource = "select * from tab_设备维修"
Adodc1.Refresh
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -