📄 frm_dlinfo.frm
字号:
AutoSize = -1 'True
Caption = "负责人电话:"
Height = 180
Left = 2610
TabIndex = 16
Top = 2625
Width = 1080
End
End
Begin VB.TextBox Text12
Height = 420
Left = -72675
TabIndex = 38
Top = 4230
Width = 1320
End
Begin VB.CommandButton Command1
Caption = "删 除"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = -69690
TabIndex = 37
Top = 4275
Width = 1000
End
Begin VB.Frame Frame2
Height = 4680
Left = -74610
TabIndex = 35
Top = 615
Width = 7575
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "Frm_dlinfo.frx":5191E
Height = 4110
Left = 345
TabIndex = 36
Top = 330
Width = 6990
_ExtentX = 12330
_ExtentY = 7250
_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
End
Begin VB.Frame Frame3
Height = 750
Left = 1710
TabIndex = 31
Top = 4455
Width = 3435
Begin VB.CommandButton CmdSave
Caption = "保存"
Height = 450
Left = 1215
TabIndex = 34
Top = 195
Width = 1000
End
Begin VB.CommandButton CmdAdd
Caption = "添 加"
Height = 450
Left = 210
TabIndex = 33
Top = 195
Width = 1000
End
Begin VB.CommandButton Command9
Caption = "退 出"
Height = 450
Left = 2175
TabIndex = 32
Top = 195
Width = 1000
End
End
Begin MSDataGridLib.DataGrid DataGrid2
Bindings = "Frm_dlinfo.frx":51933
Height = 2940
Left = -74595
TabIndex = 39
Top = 600
Width = 7305
_ExtentX = 12885
_ExtentY = 5186
_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 = -70905
TabIndex = 42
Top = 3825
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 = -74070
TabIndex = 41
Top = 4305
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 = -74295
TabIndex = 40
Top = 3795
Width = 3135
End
End
Begin VB.Label Label18
Caption = "Label18"
DataField = "小区名称"
DataSource = "Adodc3"
Height = 300
Left = 1875
TabIndex = 43
Top = 6315
Width = 1035
End
End
Attribute VB_Name = "Frm_dlinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim myval As String
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from tab_dlinfo"
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.Delete
Adodc1.Refresh
End If
End Sub
Private Sub CmdSave_Click()
If Combo1.Text = "" Or Text13 = "" Or Text6 = "" Or Text7 = "" Or Text8 = "" Or Text9 = "" Or Text5 = "" Or Text10 = "" Or Text11 = "" Then
MsgBox "输入不允许为空", 28, "提示"
Exit Sub
End If
If Not IsNumeric(Text6.Text) Then
MsgBox "输入的数据类型不正却请重新输入", 28, "提示"
Exit Sub
End If
If Not IsNumeric(Text7.Text) Then
MsgBox "输入的数据类型不正却请重新输入", 28, "提示"
Exit Sub
End If
If Not IsNumeric(Text8.Text) Then
MsgBox "输入的数据类型不正却请重新输入", 28, "提示"
Exit Sub
End If
If Not IsNumeric(Text9.Text) Then
MsgBox "输入的数据类型不正却请重新输入", 28, "提示"
Exit Sub
End If
myval = MsgBox("确定保存吗?", vbYesNo)
If myval = vbYes Then
Frm_dl.Adodc1.Recordset.Delete
Frm_dl.Adodc1.Refresh
Unload Frm_dl
Set adors = cn.Execute("insert into tab_dlinfo values('" & Text1 & "','" & Text2 & "','" & Text4 & "','" & Text10 & "','" & Text7 & "','" & Text9 & "','" & Text3 & "','" & Text13 & "','" & Text11 & "','" & Text6 & "','" & DTPicker1 & "','" & DTPicker2 & "','" & Text5 & "','" & Combo1 & "','" & Text8 & "') ")
MsgBox "数据保存成功", 32, "管理信息系统"
Adodc1.Refresh
End If
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast
End Sub
Private Sub Command3_Click()
Adodc1.Recordset.MoveFirst
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst
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 = ""
Text11.Text = ""
Frm_dl.Show
End Sub
Private Sub Command6_Click()
Adodc1.Recordset.MoveLast
End Sub
Private Sub Command9_Click()
Unload Me
Frm_main.Show
End Sub
Private Sub Form_Load()
Adodc2.RecordSource = "select * from tab_frontage"
Adodc2.Refresh
If Adodc2.Recordset.RecordCount > 0 Then
Adodc2.Recordset.MoveFirst
Do While Adodc2.Recordset.EOF = False
Combo1.AddItem Adodc2.Recordset.Fields("房屋朝向")
Combo1.ListIndex = 0
Adodc2.Recordset.MoveNext
Loop
End If
End Sub
Private Sub Text11_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text6.SetFocus
End If
End Sub
Private Sub Text12_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
frm_dlinfomd.Adodc1.RecordSource = "select * from tab_dlinfo where 大楼编号 = '" + Trim(Text12.Text) + "'"
Unload Me
frm_dlinfomd.Adodc1.Refresh
frm_dlinfomd.Show
End If
End Sub
Private Sub Text5_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Command10.SetFocus
End If
End Sub
Private Sub Text6_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text7.SetFocus
End If
End Sub
Private Sub Text8_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text9.SetFocus
End If
End Sub
Private Sub Text9_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text11.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -