📄 frm_xqinfodj.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Frm_xqinfodj
Caption = "现有小区列表"
ClientHeight = 4545
ClientLeft = 60
ClientTop = 345
ClientWidth = 5700
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4545
ScaleWidth = 5700
StartUpPosition = 1 '所有者中心
Begin MSDataGridLib.DataGrid DataGrid1
Height = 1785
Left = 120
TabIndex = 9
Top = 2580
Width = 5460
_ExtentX = 9631
_ExtentY = 3149
_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.Frame Frame3
Caption = "操作"
Height = 1785
Left = 4485
TabIndex = 5
Top = 120
Width = 1050
Begin VB.CommandButton Command4
Caption = "退出"
Height = 420
Left = 45
TabIndex = 8
Top = 1200
Width = 915
End
Begin VB.CommandButton Command2
Caption = "加入"
Height = 375
Left = 75
TabIndex = 7
Top = 750
Width = 885
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 60
TabIndex = 6
Top = 285
Width = 870
End
End
Begin VB.Frame Frame2
Caption = "被选中小区"
Height = 2415
Left = 2985
TabIndex = 4
Top = 135
Width = 1410
Begin VB.TextBox Text1
Height = 1830
Left = 105
TabIndex = 10
Top = 390
Width = 1215
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 420
Left = 1785
Top = 5295
Width = 1935
_ExtentX = 3413
_ExtentY = 741
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 100
CursorType = 3
LockType = 3
CommandType = 8
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=D:\工程与实践\物业管理系统\program\db_wygl.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\工程与实践\物业管理系统\program\db_wygl.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from tab_xqinfo "
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 VB.Frame Frame1
Caption = "选择小区信息"
Height = 2370
Left = 120
TabIndex = 0
Top = 150
Width = 2715
Begin VB.ListBox List1
Height = 1860
ItemData = "Frm_xqinfodj.frx":0000
Left = 225
List = "Frm_xqinfodj.frx":0002
TabIndex = 1
Top = 315
Width = 2250
End
End
Begin VB.Label Label2
Caption = "Label2"
DataField = "负责人"
DataSource = "Adodc1"
Height = 375
Left = 2190
TabIndex = 3
Top = 3975
Width = 1140
End
Begin VB.Label Label1
Caption = "Label1"
DataField = "小区名称"
DataSource = "Adodc1"
Height = 330
Left = 420
TabIndex = 2
Top = 4110
Width = 1185
End
End
Attribute VB_Name = "Frm_xqinfodj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "请选择小区名称", 48, "提示"
Exit Sub
End If
Frm_dl.Adodc1.RecordSource = "select * from tab_dlinfo where left(大楼编号,4) like '%" + Text1.Text + "%'"
Frm_dl.Adodc1.Refresh
If Frm_dl.Adodc1.Recordset.RecordCount > 0 Then
'Frm_dlinfo.Adodc1.Refresh
Frm_dlinfo.Show
Unload Me
Me.Hide
Else
MsgBox "你还没有生成大楼信息", 48, "提示"
Exit Sub
End If
End Sub
Private Sub Command2_Click()
Text1.Text = Left(List1.Text, 2)
End Sub
Private Sub Command3_Click()
Debug.Print Adodc1.ConnectionString
End Sub
Private Sub Command4_Click()
Frm_xqinfodj.Hide
Frm_main.Show
End Sub
Private Sub Form_Load()
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF = False
If Label1.Caption <> "" Then
If Label2.Caption <> "" Then
List1.AddItem Label1.Caption + "***" + Label2.Caption
Else
List1.AddItem Label1.Caption + "***"
End If
Else
If Label2.Caption <> "" Then
List1.AddItem "***" + Label2.Caption
Else
End If
End If
Adodc1.Recordset.MoveNext
Loop
End If
cn.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -