📄 frm_yzinfocx.frm
字号:
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_wygl.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_wygl.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from tab_fwinfo "
Caption = "Adodc3"
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
End
Begin VB.Frame Frame2
Caption = "大楼列表:"
Height = 1395
Left = 2880
TabIndex = 3
Top = 135
Width = 2745
Begin MSDataListLib.DataList DataList1
Height = 900
Left = 105
TabIndex = 13
Top = 285
Width = 2520
_ExtentX = 4445
_ExtentY = 1588
_Version = 393216
ListField = "大楼编号"
BoundColumn = "大楼名称"
End
End
Begin VB.Frame Frame1
Caption = "小区列表"
Height = 1380
Left = 120
TabIndex = 0
Top = 135
Width = 2760
Begin VB.CommandButton Command2
Caption = "退出"
Height = 350
Left = 1830
TabIndex = 15
Top = 870
Width = 615
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "frm_yzinfocx.frx":1CCB
Left = 1050
List = "frm_yzinfocx.frx":1CCD
TabIndex = 1
Top = 375
Width = 1470
End
Begin VB.Label Label1
Caption = "小区名称:"
Height = 195
Left = 120
TabIndex = 2
Top = 420
Width = 945
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 345
Left = 840
Top = 645
Width = 1200
_ExtentX = 2117
_ExtentY = 609
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 = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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 MSAdodcLib.Adodc Adodc4
Height = 450
Left = 270
Top = 1890
Width = 1680
_ExtentX = 2963
_ExtentY = 794
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=db_wygl.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db_wygl.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from tab_dlinfo"
Caption = "Adodc4"
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 MSAdodcLib.Adodc Adodc2
Height = 435
Left = 4140
Top = 5340
Width = 2040
_ExtentX = 3598
_ExtentY = 767
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 = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc2"
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
End
Attribute VB_Name = "frm_yzinfocx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Combo1_Click()
Adodc4.RecordSource = "select * from tab_dlinfo where 大楼编号 like '" + Combo1.Text + "%'"
Adodc4.Refresh
Set DataList1.RowSource = Adodc4
End Sub
Private Sub DataList1_Click()
Adodc3.RecordSource = "select * from tab_fwinfo where 大楼名称='" + DataList1.BoundText + "'"
Adodc3.Refresh
Adodc2.RecordSource = " select * from tab_rkinfo where 小区名称 = '" + Combo1.Text + "'and 大楼名称='" + DataList1.BoundText + "'"
Adodc2.Refresh
Set DataList2.RowSource = Adodc3
End Sub
Private Sub DataList2_Click()
Adodc2.RecordSource = " select * from tab_rkinfo where 小区名称 = '" + Combo1.Text + "'and 大楼名称='" + DataList1.BoundText + "' and 房间编号='" + DataList2.BoundText + "'"
Adodc2.Refresh
Adodc5.RecordSource = "select * from tab_yzinfo where 小区名称= '" & Combo1.Text & " 'and 购入房编号 ='" & DataList2.BoundText & "'"
Adodc5.Refresh
Set DataGrid3.DataSource = Adodc5
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"
Adodc1.RecordSource = "select * from tab_rkinfo"
Adodc1.Refresh
Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
Adodc3.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
Adodc4.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
Adodc5.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
Adodc6.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
Adodc6.RecordSource = "select * from tab_xqinfo"
Adodc6.Refresh
If Adodc6.Recordset.RecordCount > 0 Then
On Error Resume Next '错误处理
Adodc6.Recordset.MoveFirst '移动记录指针
Do While Adodc6.Recordset.EOF = False '当记录指针不是尾记录时,执行循环体
Combo1.AddItem Adodc6.Recordset.Fields("小区名称") '将数据表中的字段名添加到Combo1中
Adodc6.Recordset.MoveNext '移动记录指针
Loop
End If
End Sub
Private Sub Command2_Click() '退出
Unload Me
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then Command1.SetFocus
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -