【VB开源代码栏目提醒】:网学会员VB开源代码为您提供repair_delete.frm参考,解决您在repair_delete.frm学习中工作中的难题,参考学习。
VERSION 5.00
Begin VB.Form repair_delete
Caption = "维修返还"
ClientHeight = 5175
ClientLeft = 60
ClientTop = 345
ClientWidth = 6360
LinkTopic = "Form1"
ScaleHeight = 5175
ScaleWidth = 6360
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
Enabled = 0 'False
Height = 375
Left = 1920
TabIndex = 13
Top = 2640
Width = 1695
End
Begin VB.CommandButton Command4
Caption = "取消"
Height = 495
Left = 3720
TabIndex = 5
Top = 4320
Width = 1095
End
Begin VB.TextBox Text10
Enabled = 0 'False
Height = 375
Left = 1920
TabIndex = 4
Top = 1920
Width = 1455
End
Begin VB.CommandButton Command2
Caption = "完成"
Height = 495
Left = 2040
TabIndex = 3
Top = 4320
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确认"
Height = 375
Left = 4680
TabIndex = 2
Top = 240
Width = 975
End
Begin VB.TextBox Text1
Height = 375
Left = 1920
TabIndex = 1
Top = 240
Width = 2295
End
Begin VB.TextBox Text11
Enabled = 0 'False
Height = 615
Left = 1920
MultiLine = -1 'True
TabIndex = 0
Top = 1080
Width = 3975
End
Begin VB.Label Label4
Caption = "故障时间:"
Height = 495
Left = 600
TabIndex = 12
Top = 2640
Width = 1095
End
Begin
VB.Label Label3
ForeColor = &H000000FF&
Height = 495
Left = 1920
TabIndex = 11
Top = 3360
Width = 1575
End
Begin VB.Label Label2
Caption = "目前状态:"
Height = 495
Left = 600
TabIndex = 10
Top = 3360
Width = 1095
End
Begin VB.Label Label13
Caption = "经手人:"
Height = 375
Left = 600
TabIndex = 9
Top = 1920
Width = 975
End
Begin VB.Label Label12
Caption = "故障:"
Height = 375
Left = 600
TabIndex = 8
Top = 1200
Width = 1095
End
Begin VB.Label Label11
ForeColor = &H000000FF&
Height = 375
Left = 7200
TabIndex = 7
Top = 3840
Width = 735
End
Begin VB.Label Label1
Caption = "设备编号:"
Height = 375
Left = 600
TabIndex = 6
Top = 240
Width = 1095
End
End
Attribute VB_Name = "repair_delete"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\file.mdb;Persist Security Info=False"
sql = "select * from repair where dno='" & Text1.Text & "' and rflag=0 "
rs.Open sql, cn, 1, 1
If rs.EOF = True Then
MsgBox "没有在维修记录中找到该设备"
Else
Text11.Text = rs("rprob")
Text10.Text = rs("operator")
Text2.Text = rs("date")
Label3.Caption = "等待维修"
End If
End Sub
Private Sub Command2_Click()
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\file.mdb;Persist Security Info=False"
sql = "select * from repair where dno='" & Text1.Text & "' and rflag=0 "
rs.Open sql, cn, 3, 2
rs("rflag") = 1
rs.Update
End Sub