form1.frm
来自「vb数据库编程资料」· FRM 代码 · 共 114 行
FRM
114 行
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3165
ClientLeft = 60
ClientTop = 450
ClientWidth = 5670
LinkTopic = "Form1"
ScaleHeight = 3165
ScaleWidth = 5670
StartUpPosition = 3 '窗口缺省
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "C:\Documents and Settings\tongaihong\桌面\VB数据库程序与数据\08\教学.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 600
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 2640
Width = 3255
End
Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1
Bindings = "Form1.frx":0000
Height = 1215
Left = 120
TabIndex = 5
Top = 1320
Width = 4815
_ExtentX = 8493
_ExtentY = 2143
_Version = 393216
FixedCols = 0
End
Begin VB.CommandButton Command1
Caption = "查询"
Height = 375
Left = 240
TabIndex = 4
Top = 720
Width = 975
End
Begin VB.TextBox Text2
BeginProperty DataFormat
Type = 1
Format = "yyyy-M-d"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 3
EndProperty
Height = 375
Left = 3480
TabIndex = 3
Top = 120
Width = 1695
End
Begin VB.TextBox Text1
BeginProperty DataFormat
Type = 1
Format = "yyyy-M-d"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 3
EndProperty
Height = 375
Left = 1320
TabIndex = 2
Top = 120
Width = 1455
End
Begin VB.Label Label2
Caption = "到:"
Height = 255
Left = 3000
TabIndex = 1
Top = 120
Width = 495
End
Begin VB.Label Label1
Caption = "出生日期从:"
Height = 255
Left = 240
TabIndex = 0
Top = 120
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim SQLStr As String
If Len(Trim(Text1.Text)) = 0 Or Len(Trim(Text2.Text)) = 0 Then
MsgBox ("必须输入日期范围")
Exit Sub
End If
SQLStr = "SELECT * FROM 教师表 WHERE 出年日期 "
SQLStr = SQLStr + " BETWEEN " & "#" & Text1.Text & "# AND #" & Text2.Text & "#"
Data1.RecordSource = SQLStr
Data1.Refresh
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?