📄 frmtestboundcombo.frm
字号:
VERSION 5.00
Object = "{EF50C1D0-C73B-11D1-83D0-002078124F06}#1.0#0"; "BoundComboControl.ocx"
Begin VB.Form frmTestBoundCombo
Caption = "Test Bound Control"
ClientHeight = 2820
ClientLeft = 60
ClientTop = 345
ClientWidth = 6930
LinkTopic = "Form1"
ScaleHeight = 2820
ScaleWidth = 6930
StartUpPosition = 3 'Windows Default
Begin BoundComboControl.ctlBoundCombo usrMarStatBound
DataField = "MaritalStatus"
DataSource = "dtaSuspects"
Height = 315
Left = 4320
TabIndex = 17
Top = 1200
Width = 1455
_ExtentX = 2566
_ExtentY = 556
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ListIndex = -1
strCodeType = "MAR STAT"
End
Begin BoundComboControl.ctlBoundCombo usrReligionBound
DataField = "Religion"
DataSource = "dtaSuspects"
Height = 315
Left = 4320
TabIndex = 16
Top = 840
Width = 1455
_ExtentX = 2566
_ExtentY = 556
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ListIndex = -1
strCodeType = "RELIGION"
End
Begin BoundComboControl.ctlBoundCombo usrHairBound
DataField = "HairClr"
DataSource = "dtaSuspects"
Height = 315
Left = 4320
TabIndex = 15
Top = 480
Width = 1455
_ExtentX = 2566
_ExtentY = 556
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ListIndex = -1
strCodeType = "HAIRCOLOR"
End
Begin BoundComboControl.ctlBoundCombo usrEyeBound
DataField = "EyeColor"
DataSource = "dtaSuspects"
Height = 315
Left = 4320
TabIndex = 14
Top = 120
Width = 1455
_ExtentX = 2566
_ExtentY = 556
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ListIndex = -1
strCodeType = "EYECOLOR"
End
Begin VB.Data dtaSuspects
Caption = "Criminal Suspects"
Connect = "Access"
DatabaseName = "D:\Waite\Chapter.14\How-to.E02\CodeValues.mdb"
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 495
Left = 120
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "Subject"
Top = 2040
Width = 4215
End
Begin VB.TextBox txtAlias
DataField = "Alias"
DataSource = "dtaSuspects"
Height = 285
Left = 1440
TabIndex = 13
Top = 1560
Width = 1455
End
Begin VB.TextBox txtMiddleName
DataField = "MiddleName"
DataSource = "dtaSuspects"
Height = 285
Left = 1440
TabIndex = 12
Top = 1200
Width = 1455
End
Begin VB.TextBox txtFirstName
DataField = "FirstName"
DataSource = "dtaSuspects"
Height = 285
Left = 1440
TabIndex = 11
Top = 840
Width = 1455
End
Begin VB.TextBox txtLastName
DataField = "LastName"
DataSource = "dtaSuspects"
Height = 285
Left = 1440
TabIndex = 10
Top = 480
Width = 1455
End
Begin VB.TextBox txtSuspectId
DataField = "SuspectId"
DataSource = "dtaSuspects"
Enabled = 0 'False
Height = 285
Left = 1440
TabIndex = 9
Top = 120
Width = 1455
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "Marital Status:"
Height = 195
Left = 3120
TabIndex = 8
Top = 1200
Width = 1005
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "Religion:"
Height = 195
Left = 3120
TabIndex = 7
Top = 840
Width = 615
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "Hair Color:"
Height = 195
Left = 3120
TabIndex = 6
Top = 480
Width = 735
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "Eye Color:"
Height = 195
Left = 3120
TabIndex = 5
Top = 120
Width = 720
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "Alias:"
Height = 195
Left = 120
TabIndex = 4
Top = 1560
Width = 375
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "Middle Name:"
Height = 195
Left = 120
TabIndex = 3
Top = 1200
Width = 975
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "First Name:"
Height = 195
Left = 120
TabIndex = 2
Top = 840
Width = 795
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "Last Name:"
Height = 195
Left = 120
TabIndex = 1
Top = 480
Width = 810
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "SuspectId:"
Height = 195
Left = 120
TabIndex = 0
Top = 120
Width = 765
End
End
Attribute VB_Name = "frmTestBoundCombo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
dtaSuspects.DatabaseName = App.Path & "\CodeValues.mdb"
dtaSuspects.Refresh
' Initialize the bound combo controls
Set usrEyeBound.objDatabase = dtaSuspects.Database
Set usrHairBound.objDatabase = dtaSuspects.Database
Set usrReligionBound.objDatabase = dtaSuspects.Database
Set usrMarStatBound.objDatabase = dtaSuspects.Database
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -