📄 frm_wxinfo.frm
字号:
TabIndex = 3
Top = 1425
Width = 1080
End
Begin VB.ComboBox Combo3
Height = 300
ItemData = "Frm_wxinfo.frx":0083
Left = 4245
List = "Frm_wxinfo.frx":0090
TabIndex = 2
Top = 2805
Width = 1800
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 300
Left = 1005
TabIndex = 14
Top = 1845
Width = 1320
_ExtentX = 2328
_ExtentY = 529
_Version = 393216
Format = 59637761
CurrentDate = 38199
End
Begin MSComCtl2.DTPicker DTPicker2
Height = 300
Left = 2970
TabIndex = 15
Top = 1860
Width = 1335
_ExtentX = 2355
_ExtentY = 529
_Version = 393216
Format = 59637761
CurrentDate = 38199
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "处理意见:"
Height = 180
Left = 165
TabIndex = 29
Top = 3345
Width = 900
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "业主意见:"
Height = 180
Left = 165
TabIndex = 28
Top = 2865
Width = 900
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "时间从:"
Height = 180
Left = 135
TabIndex = 27
Top = 1980
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "维修金额:"
Height = 180
Left = 135
TabIndex = 26
Top = 2400
Width = 900
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "接待人:"
Height = 165
Left = 135
TabIndex = 25
Top = 1470
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "居住位置:"
Height = 180
Left = 2550
TabIndex = 24
Top = 555
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "维修编号:"
Height = 180
Left = 165
TabIndex = 23
Top = 600
Width = 900
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "投诉编号:"
Height = 180
Left = 150
TabIndex = 22
Top = 1050
Width = 900
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "维修项目:"
Height = 180
Left = 2535
TabIndex = 21
Top = 1005
Width = 900
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "维修人员:"
Height = 300
Left = 2100
TabIndex = 20
Top = 1470
Width = 900
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "维修方式:"
Height = 165
Left = 4110
TabIndex = 19
Top = 1470
Width = 900
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "维修用料:"
Height = 180
Left = 2220
TabIndex = 18
Top = 2340
Width = 900
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "至"
Height = 180
Left = 2550
TabIndex = 17
Top = 1905
Width = 180
End
Begin VB.Label Label14
AutoSize = -1 'True
Caption = "状态:"
Height = 180
Left = 3705
TabIndex = 16
Top = 2805
Width = 540
End
End
Begin MSDataGridLib.DataGrid DataGrid2
Bindings = "Frm_wxinfo.frx":00AC
Height = 2835
Left = -74445
TabIndex = 39
Top = 660
Width = 6765
_ExtentX = 11933
_ExtentY = 5001
_Version = 393216
HeadLines = 1
RowHeight = 15
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 VB.Label Label21
AutoSize = -1 'True
Caption = "点击要删除的记录然后按删除按钮:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Left = -71205
TabIndex = 42
Top = 3690
Width = 3135
End
Begin VB.Label Label20
AutoSize = -1 'True
Caption = "维修编号:"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = -74370
TabIndex = 41
Top = 4170
Width = 1065
End
Begin VB.Label Label19
AutoSize = -1 'True
Caption = "输入要更新记录的编号然后按回车:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Left = -74595
TabIndex = 40
Top = 3660
Width = 3135
End
End
Begin VB.Label Label17
Caption = "Label17"
DataField = "投诉编号"
DataSource = "Adodc2"
Height = 285
Left = 5970
TabIndex = 45
Top = 5820
Width = 945
End
End
Attribute VB_Name = "Frm_wxinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click(Index As Integer)
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text10.Text = ""
Text11.Text = ""
Adodc1.RecordSource = "select * from tab_wxinfo order by 维修编号"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
If Adodc1.Recordset.EOF = False Then
Adodc1.Recordset.MoveLast
Text1.Text = "wx" + Trim(Mid(Adodc1.Recordset.Fields("维修编号"), 3, 2) + 1)
Else
Text1.Text = "wx" + Trim(Mid(Adodc1.Recordset.Fields("维修编号"), 3, 2) + 1)
End If
Else
Text1.Text = "wx1"
End If
End Sub
Private Sub Command2_Click(Index As Integer)
If Text6.Text <> "" Then
If Not IsNumeric(Trim(Text6.Text)) Then
MsgBox "维修金额请填数字"
Exit Sub
End If
Else
Text6.Text = Val(Text6.Text)
End If
If Text10 = "" Then
MsgBox "处理意见不能为空 ", 28, "提示"
Exit Sub
Else
Set adors = cn.Execute("insert into tab_wxinfo values('" & Text1 & "','" & Text2 & "','" & Combo1 & "','" & Text11 & "','" & Text3 & "','" & Text4 & "','" & Combo2 & "','" & Text6 & "','" & Text7 & "','" & Trim(Str(DTPicker1)) & "','" & Trim(Str(DTPicker2)) & "','" & Text8 & "','" & Text10 & "','" & Combo3 & "') ")
MsgBox "数据保存成功", 78, "管理信息系统"
Adodc1.Refresh
cn.Close
End If
End Sub
Private Sub Command4_Click(Index As Integer)
Unload Me
End Sub
Private Sub Command7_Click()
Dim myval As String
Adodc1.RecordSource = "select * from tab_wxinfo"
If Adodc1.Recordset.RecordCount > 0 Then
myval = MsgBox("确定删除吗?", vbYesNo)
If myval = vbYes Then
Adodc1.Recordset.Delete
Else
End If
Else
MsgBox "数据库中没有记录要删除"
End If
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
Adodc2.Recordset.MoveFirst
Do While Adodc2.Recordset.EOF = False
Combo1.AddItem Label17.Caption
Adodc2.Recordset.MoveNext
Loop
End If
Adodc1.RecordSource = "select * from tab_wxinfo order by 维修编号 "
Adodc1.Refresh
cn.Close
End Sub
Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Frm_wxinfomd.Adodc1.RecordSource = "select * from tab_wxinfo where 维修编号 = '" + Text5.Text + "'"
Unload Me
Frm_wxinfomd.Adodc1.Refresh
Frm_wxinfomd.Show
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -