【VB开源代码栏目提醒】:网学会员VB开源代码为您提供frmduty.frm参考,解决您在frmduty.frm学习中工作中的难题,参考学习。
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Begin VB.Form frmduty
BorderStyle = 1 'Fixed Single
Caption = "卫生检查评分查询"
ClientHeight = 7845
ClientLeft = 1875
ClientTop = 2445
ClientWidth = 12285
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 7845
ScaleWidth = 12285
Begin VB.CommandButton Command1
Caption = "导出打印"
Enabled = 0 'False
Height = 375
Left = 5880
MaskColor = &H00C0C0FF&
Style = 1 'Graphical
TabIndex = 21
Top = 6720
Width = 1455
End
Begin VB.ComboBox Combo2
Height = 300
ItemData = "frmduty.frx":0000
Left = 6960
List = "frmduty.frx":0002
TabIndex = 19
Top = 720
Width = 1215
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "frmduty.frx":0004
Left = 2880
List = "frmduty.frx":0026
TabIndex = 18
Top = 720
Width = 1215
End
Begin VB.CheckBox Check4
Caption = "选择分数"
Height = 375
Left = 360
TabIndex = 17
Top = 3360
Width = 1335
End
Begin MSHierarchicalFlexGridLib.MSHFlexGrid myflexgrid
Height = 4935
Left = 2040
TabIndex = 0
Top = 1560
Width = 9855
_ExtentX = 17383
_ExtentY = 8705
_Version = 393216
Rows = 20
Cols = 9
AllowBigSelection= 0 'False
FillStyle = 1
MergeCells = 1
AllowUserResizing= 3
BandDisplay = 1
RowSizingMode = 1
_NumberOfBands = 1
_Band(0).Cols = 9
End
Begin VB.TextBox txttime
BackColor = &H8000000E&
Height = 375
Left = 360
TabIndex = 15
Top = 2400
Width = 1215
End
Begin VB.CheckBox Check3
Caption = "选择日期"
Height = 375
Left = 480
TabIndex = 14
Top = 1560
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "退出查询"
Height = 375
Left = 240
TabIndex = 12
Top = 5760
Width = 1335
End
Begin VB.CheckBox Check2
Caption = "按栋号和宿舍号"
Height = 375
Left = 4440
TabIndex = 11
Top = 720
Width = 1575
End
Begin VB.CheckBox Check1
Caption = "按栋号"
Height = 375
Left = 1320
TabIndex = 10
Top = 720
Width = 975
End
Begin VB.Frame Frame2
Height = 135
Left = 1920
TabIndex = 9
Top = 360
Width = 8535
End
Begin VB.Frame Frame1
Height = 255
Left = 1920
TabIndex = 8
Top = 1200
Width = 9975
End
Begin VB.CommandButton Cominquire
Caption = "查询"
Height = 375
Left = 240
TabIndex = 7
Top = 5040
Width = 1335
End
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 6
Top = 7470
Width = 12285
_ExtentX = 21669
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 1
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Picture = "frmduty.frx":0052
Text = "查询区"
TextSave = "
查询区"
EndProperty
EndProperty
End
Begin
VB.ComboBox Combo7
BackColor = &H8000000E&
Height = 300
ItemData = "frmduty.frx":02E4
Left = 360
List = "frmduty.frx":02F4
TabIndex = 5
Top = 4200
Width = 1335
End
Begin VB.Label Label6
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "(平均分)"
ForeColor = &H80000008&
Height = 255
Left = 600
TabIndex = 20
Top = 3840
Width = 855
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "输入日期"
Height = 255
Left = 600
TabIndex = 16
Top = 2160
Width = 735
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "栋号"
Height = 255
Left = 2400
TabIndex = 13
Top = 840
Width = 375
End
Begin VB.Line Line2
X1 = 1920
X2 = 1920
Y1 = 1200
Y2 = 6480
End
Begin VB.Line Line1
X1 = 1920
X2 = 9120
Y1 = 1200
Y2 = 1200
End
Begin VB.Label Label10
BackStyle = 0 'Transparent
Caption = "宿舍卫生检查评分查询"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4440
TabIndex = 4
Top = 0
Width = 3375
End
Begin VB.Label Label5
Caption = "(精确查询)"
Height = 255
Left = 8160
TabIndex = 3
Top = 840
Width = 1095
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "宿舍号"
Height = 255
Left = 6240
TabIndex = 2
Top = 840
Width = 615
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "查询条件:"
Height = 255
Left = 240
TabIndex = 1
Top = 840
Width = 1335
End
End
Attribute VB_Name = "frmduty"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim txtSQL As String
Private Sub Data1_Validate(Action As Integer, Save As Integer)
End Sub
Private Sub cominquire_Click()
' Dim txtSQL As String
Dim MsgText As String
Dim dd(5) As Boolean
Dim mrc As ADODB.Recordset
Dim rs As Boolean
Dim sMeg As String
rs = True
txtSQL = "select * from hygiene_check where "
If Check1.Value Then
If Trim(Combo1.Text) = "" Then
sMeg = "栋号不能为空"
MsgBox sMeg, vbOKOnly + vbExclamation, "警告"