【VB开源代码栏目提醒】:网学会员为需要VB开源代码的朋友们搜集整理了FrmDataComboList.frm相关资料,希望对各位网友有所帮助!
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form FrmDataComboList
BorderStyle = 1 'Fixed Single
Caption = "Test DataCombo & DataList"
ClientHeight = 3315
ClientLeft = 45
ClientTop = 330
ClientWidth = 3435
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3315
ScaleWidth = 3435
StartUpPosition = 2 '屏幕中心
Begin MSDataListLib.DataCombo DataCombo1
Bindings = "FrmDataComboList.frx":0000
Height = 330
Left = 240
TabIndex = 1
Top = 240
Width = 3015
_ExtentX = 5318
_ExtentY = 582
_Version = 393216
Style = 2
ListField = "Dep_name"
BoundColumn = "Dep_id"
Text = "DataCombo1"
End
Begin MSDataListLib.DataList DataList1
Bindings = "FrmDataComboList.frx":0015
Height = 2370
Left = 240
TabIndex = 0
Top = 720
Width = 3015
_ExtentX = 5318
_ExtentY = 4180
_Version = 393216
ListField = "Emp_Name"
End
Begin MSAdodcLib.Adodc Adodc2
Height = 330
Left = 240
Top = 3000
Visible = 0 'False
Width = 3015
_ExtentX = 5318
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=newdb"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "newdb"
OtherAttributes = ""
UserName = "sa"
Password = "sa"
RecordSource = "SELECT * FROM Employee ORDER BY Emp_Id"
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
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 240
Top = 0
Visible = 0 'False
Width = 3015
_ExtentX = 5318
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 2
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 = "DSN=newdb"
OLEDBString = "DSN=newdb"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = "sa"
Pass
word = "sa"
RecordSource = "SELECT * FROM Department ORDER BY Dep_Id"
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
End
Attribute VB_Name = "FrmDataComboList"
Attribute
VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub DataCombo1_Click(Area As Integer)
If DataCombo1.Text = "" Then
Exit Sub
End If
Dim strQuery As String
strQuery = "Select * FROM Employee WHERE Dep_Id = " _
+ DataCombo1.BoundText
With Adodc2
.RecordSource = strQuery
.Refresh
End With
DataList1.ReFill
End Sub
Private Sub Form_Load()
DataCombo1.Text = Adodc1.Recordset.Fields(1)
DataCombo1_Click (0)
End Sub