📄 frm_tn.frm
字号:
Height = 300
Left = 1275
TabIndex = 8
Top = 1620
Width = 1440
End
Begin VB.TextBox Text12
Height = 270
Left = 1260
TabIndex = 47
Text = "Text12"
Top = 2010
Width = 1275
End
Begin VB.TextBox Text13
Height = 315
Left = 1245
TabIndex = 48
Text = "Text13"
Top = 2400
Width = 1410
End
Begin VB.TextBox Text14
Height = 315
Left = 4215
TabIndex = 49
Text = "Text14"
Top = 2415
Width = 1455
End
Begin VB.Label Label14
AutoSize = -1 'True
Caption = "完工日期:"
Height = 180
Left = 330
TabIndex = 29
Top = 2085
Width = 900
End
Begin VB.Label Label13
AutoSize = -1 'True
Caption = "退押金日期:"
Height = 180
Left = 3075
TabIndex = 28
Top = 2490
Width = 1080
End
Begin VB.Label Label12
AutoSize = -1 'True
Caption = "装修管理费:"
Height = 180
Left = 2790
TabIndex = 27
Top = 1275
Width = 1080
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "经办人:"
Height = 180
Left = 3105
TabIndex = 26
Top = 2100
Width = 720
End
Begin VB.Label Label10
AutoSize = -1 'True
Caption = "装修押金:"
Height = 180
Left = 2760
TabIndex = 25
Top = 1650
Width = 900
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "申请人:"
Height = 180
Left = 2505
TabIndex = 24
Top = 825
Width = 720
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "装修队:"
Height = 180
Left = 2520
TabIndex = 23
Top = 420
Width = 720
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "装修内容:"
Height = 180
Left = 315
TabIndex = 22
Top = 2895
Width = 900
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "申请日期:"
Height = 180
Left = 330
TabIndex = 21
Top = 2490
Width = 900
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "验收:"
Height = 180
Left = 4095
TabIndex = 20
Top = 840
Width = 540
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "罚 金:"
Height = 180
Left = 315
TabIndex = 19
Top = 1650
Width = 900
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "预 算:"
Height = 180
Left = 330
TabIndex = 18
Top = 1245
Width = 900
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "客 户:"
Height = 180
Left = 315
TabIndex = 17
Top = 825
Width = 900
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "编 号:"
Height = 180
Left = 315
TabIndex = 16
Top = 420
Width = 900
End
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "frm_tn.frx":0069
Height = 2835
Left = -74715
TabIndex = 32
Top = 630
Width = 6480
_ExtentX = 11430
_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 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 = -74640
TabIndex = 35
Top = 3660
Width = 6240
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 = -74640
TabIndex = 34
Top = 4200
Width = 1065
End
Begin VB.Label Label21
AutoSize = -1 'True
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Left = -71370
TabIndex = 33
Top = 3720
Width = 105
End
End
Begin VB.Label Label17
Caption = "Label17"
DataField = "装修队名"
DataSource = "Adodc2"
Height = 390
Left = 6090
TabIndex = 41
Top = 5595
Width = 1020
End
End
Attribute VB_Name = "frm_zxinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
Adodc2.RecordSource = "select * from tab_zxgroup"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
Adodc2.Recordset.MoveFirst
Do While Adodc2.Recordset.EOF = False
Combo1.AddItem Adodc2.Recordset.Fields("装修队名")
Adodc2.Recordset.MoveNext
Loop
End If
End Sub
Private Sub CmdAdd_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Adodc1.RecordSource = "select * from tab_zxinfo order by 编号"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
If Adodc1.Recordset.EOF = False Then
Adodc1.Recordset.MoveLast
Text1.Text = "zx" + Trim(Mid(Adodc1.Recordset.Fields("编号"), 3, 2) + 1)
Else
Text1.Text = "zx" + Trim(Mid(Adodc1.Recordset.Fields("编号"), 3, 2) + 1)
End If
Else
Text1.Text = "zx1"
End If
End Sub
Private Sub CmdSave_Click()
If Text4.Text = "" Or Text5.Text = "" Or Text7.Text = "" Or Text8.Text = "" Or Text9.Text = "" Or Text10.Text = "" Or Text12.Text = "" Or Text13.Text = "" Or Text14.Text = "" Then
MsgBox "输入不能为空,"
Exit Sub
End If
Text4 = Trim(Val(Text4))
Text5 = Trim(Val(Text5))
Text6 = Trim(Val(Text6))
Text7 = Trim(Val(Text7))
Set adors = cn.Execute("insert into tab_zxinfo values('" & Text1 & "','" & Text2 & "','" & Text3 & "','" & Text9 & "','" & Text13 & "','" & Text12 & "','" & Text7 & "','" & Text4 & "','" & Text5 & "','" & Text14 & "','" & Text6 & "','" & Text10 & "','" & Combo1 & "','" & Text8 & "') ")
MsgBox "数据保存成功", 78, "管理信息系统"
Adodc1.Refresh
End Sub
Private Sub CmdRefresh_Click()
Adodc1.Refresh
End Sub
Private Sub CmdDelete_Click()
Dim myval As String
Adodc1.RecordSource = "select * from tab_zxinfo"
If Adodc1.Recordset.RecordCount > 0 Then
myval = MsgBox("确定删除吗?", vbYesNo)
If myval = vbYes Then Adodc1.Recordset.Delete
Else
MsgBox "数据库中没有记录要删除"
End If
End Sub
Private Sub CmdCancel_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
End Sub
Private Sub CmdExit_Click()
Unload Me
End Sub
Private Sub DTPicker1_Click()
Text13.Text = DTPicker1.Value
End Sub
Private Sub DTPicker2_Click()
Text14.Text = DTPicker2.Value
End Sub
Private Sub DTPicker3_Click()
Text12.Text = DTPicker3.Value
End Sub
Private Sub Text11_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Frm_zxinfomd.Adodc1.RecordSource = "select * from tab_zxinfo where 编号 = '" + Text11.Text + "'"
Unload Me
Frm_zxinfomd.Adodc1.Refresh
Frm_zxinfomd.Show
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text3.SetFocus
End If
End Sub
Private Sub Text3_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text4.SetFocus
End If
End Sub
Private Sub Text4_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text6.SetFocus
End If
End Sub
Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text7.SetFocus
End If
End Sub
Private Sub Text6_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text8.SetFocus
End If
End Sub
Private Sub Text7_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text9.SetFocus
End If
End Sub
Private Sub Text8_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text5.SetFocus
End If
End Sub
Private Sub Text9_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text10.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -