📄 dlgreport.frm
字号:
VERSION 5.00
Begin VB.Form DlgReport
BackColor = &H8000000A&
BorderStyle = 3 'Fixed Dialog
Caption = "输出报表"
ClientHeight = 1080
ClientLeft = 2295
ClientTop = 3390
ClientWidth = 6105
Icon = "DlgReport.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1080
ScaleWidth = 6105
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command3
Caption = "补考学生"
Height = 375
Left = 3360
TabIndex = 3
Top = 600
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "学生的各科成绩"
Height = 375
Left = 1680
TabIndex = 2
Top = 600
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "学生自然状况"
Height = 375
Left = 120
TabIndex = 1
Top = 600
Width = 1455
End
Begin VB.CommandButton OKButton
Caption = "关闭"
Default = -1 'True
Height = 375
Left = 4800
TabIndex = 0
Top = 600
Width = 1215
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "报表预览和打印"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 120
TabIndex = 4
Top = 120
Width = 1800
End
End
Attribute VB_Name = "DlgReport"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
'DataEnvironment.Connection1 = cn
'Set DataEnvironment.Commands.Item(1).ActiveConnection = cn
'DataEnvironment.Commands.Item(1).Prepared = False
'DataEnvironment.Commands.Item(1).CommandText = "SELECT * FROM 学生 WHERE 学号>=" & "'" & Text1.Text & "'" & "AND 学号<=" & "'" & Text2.Text & "'" & "ORDER BY 学号 ASC"
'DataEnvironment.Commands.Item(1).Execute
On Error GoTo errh
DataReport1.Show
Exit Sub
errh:
MsgBox Err.Description
End Sub
Private Sub Command2_Click()
ReportAch.Show
End Sub
Private Sub Command3_Click()
Reportreject.Show
End Sub
Private Sub Form_Load()
On Error GoTo errh
'DataEnvironment.Connection1.CursorLocation = adUseClient
'DataEnvironment.Connection1.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)};" & _
'"DBQ=学籍.MDB;" & _
''"DefaultDir=" & App.Path & ";" & _
"UID=;PWD=;" & _
'"PASSWORD=197967yh" '数据库密码 ,防止被人用其它软件打开数据库
'DataEnvironment.Connection1.Open
MakeCenter DlgReport
If DataEnvironment.Connection1 <> cn Then
DataEnvironment.Connection1 = cn
End If
Exit Sub
errh:
MsgBox Err.Description
End Sub
Private Sub OKButton_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -