📄 frmselectcustoinfo.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Begin VB.Form frmselectcustoinfo
Caption = "学生信息查询"
ClientHeight = 6690
ClientLeft = 60
ClientTop = 345
ClientWidth = 8025
Icon = "frmselectcustoinfo.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 6690
ScaleWidth = 8025
StartUpPosition = 3 '窗口缺省
Begin VB.PictureBox Picture1
AutoSize = -1 'True
Height = 330
Left = 5280
Picture = "frmselectcustoinfo.frx":038A
ScaleHeight = 270
ScaleWidth = 255
TabIndex = 10
Top = 240
Width = 315
End
Begin VB.CommandButton cmdExit
Caption = "退出窗体"
BeginProperty Font
Name = "新宋体"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6720
TabIndex = 5
Top = 960
Width = 1095
End
Begin VB.Frame Frame1
Caption = "查询方式"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1575
Left = 120
TabIndex = 4
Top = 960
Width = 2295
Begin VB.OptionButton option3
Caption = "姓名"
Height = 255
Left = 480
TabIndex = 9
Top = 1080
Width = 1215
End
Begin VB.OptionButton Option2
Caption = "用户编号"
Height = 255
Left = 480
TabIndex = 8
Top = 720
Width = 1095
End
Begin VB.OptionButton Option1
Caption = "电表号"
Height = 255
Left = 480
TabIndex = 7
Top = 360
Value = -1 'True
Width = 975
End
End
Begin VB.Frame Frame2
Caption = "查询关键字"
Height = 1095
Left = 2880
TabIndex = 0
Top = 1440
Width = 4935
Begin VB.TextBox txtSelect
Height = 375
Left = 2040
TabIndex = 2
Top = 360
Width = 1575
End
Begin VB.CommandButton cmdSelect
Caption = "查询"
Height = 375
Left = 3720
TabIndex = 1
Top = 360
Width = 1095
End
Begin VB.Label Label1
Caption = "请输入查询关键字"
Height = 375
Left = 120
TabIndex = 3
Top = 480
Width = 1815
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 1200
Top = 3600
Visible = 0 'False
Width = 4095
_ExtentX = 7223
_ExtentY = 661
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= 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 = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSHFlexGrid1
Bindings = "frmselectcustoinfo.frx":04AA
Height = 3975
Left = 0
TabIndex = 11
Top = 2640
Width = 7935
_ExtentX = 13996
_ExtentY = 7011
_Version = 393216
Cols = 15
_NumberOfBands = 1
_Band(0).Cols = 15
End
Begin VB.Label Label2
Caption = "用户信息查询"
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 375
Left = 2760
TabIndex = 6
Top = 240
Width = 2295
End
End
Attribute VB_Name = "frmselectcustoinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdExit_Click()
Unload Me
End Sub
'查询
Private Sub cmdSelect_Click()
Dim str As String
If Me.Option1.Value Then
str = Trim(Me.Option1.Caption)
End If
If Me.Option2 Then
str = Trim(Me.Option2.Caption)
End If
If Me.Option3 Then
str = Trim(Me.Option3.Caption)
End If
Me.Adodc1.RecordSource = " select * from 用户信息表 where " & str & "= '" & Me.txtSelect.Text & "'"
Me.Adodc1.Refresh
Set Me.MSHFlexGrid1.DataSource = Me.Adodc1
End Sub
Private Sub Form_Load()
Me.Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.path & "\electric.MDB;Persist Security Info=False"
Me.Adodc1.RecordSource = "用户信息表"
Set Me.MSHFlexGrid1.DataSource = Me.Adodc1
MakeCenter Me '窗体位于屏幕中间
End Sub
Private Sub Option1_Click()
Me.Option1.Value = True
Me.Option2.Value = False
Me.Option3.Value = False
Me.txtSelect.Text = ""
End Sub
Private Sub Option2_Click()
Me.Option1.Value = False
Me.Option2.Value = True
Me.Option3.Value = False
Me.txtSelect.Text = ""
End Sub
Private Sub Option3_Click()
Me.Option1.Value = False
Me.Option2.Value = False
Me.Option3.Value = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -