📄 seekyearout.frm
字号:
VERSION 5.00
Begin VB.Form seekyearout
Caption = "查询年份"
ClientHeight = 3195
ClientLeft = 3765
ClientTop = 2865
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
Begin VB.Frame Frame1
Caption = "年份"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1575
Left = 480
TabIndex = 2
Top = 360
Width = 3615
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
ItemData = "seekyearout.frx":0000
Left = 1680
List = "seekyearout.frx":0002
Style = 2 'Dropdown List
TabIndex = 3
Top = 600
Width = 1575
End
Begin VB.Label Label1
Caption = "年份:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 720
TabIndex = 4
Top = 600
Width = 1095
End
End
Begin VB.CommandButton Command1
Caption = "确认"
Default = -1 'True
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 720
TabIndex = 1
Top = 2280
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "返回"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2760
TabIndex = 0
Top = 2280
Width = 1215
End
End
Attribute VB_Name = "seekyearout"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public seekyear As Date
Private Sub Command1_Click()
Me.Hide
If Combo1.Text = "" Then
MsgBox "查询年份不能为空!", vbCritical, "提示"
Command2.SetFocus
End If
frmoutcx.Show (1)
End Sub
Private Sub Command2_Click()
Unload Me
frmmenu.Show
End Sub
Private Sub Form_Load()
Dim db As Database
Dim wk As Workspace
Set wk = DBEngine.Workspaces(0)
Dim rs As Recordset
Set db = OpenDatabase("xsys", dbDriverNoPrompt, False, "odbc;database=glxt;uid=;pwd=;dsn=xsys")
wk.BeginTrans
Set rs = db.OpenRecordset("nian", dbOpenDynaset, dbwrite, dbOptimistic)
rs.MoveFirst
Do While rs.EOF <> True
Combo1.AddItem (rs.Fields("年"))
rs.MoveNext
If rs.EOF = True Then
Exit Do
End If
Loop
wk.CommitTrans
rs.Close
db.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -