frm_date.frm
资源名称:jtlc.rar [点击查看]
上传用户:xxdyjx888
上传日期:2022-06-01
资源大小:55k
文件大小:5k
源码类别:
家庭/个人应用
开发平台:
Visual Basic
- VERSION 5.00
- Begin VB.Form frm_date
- BorderStyle = 3 'Fixed Dialog
- Caption = "选择月份"
- ClientHeight = 1755
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 3690
- Icon = "frm_date.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 1755
- ScaleWidth = 3690
- ShowInTaskbar = 0 'False
- StartUpPosition = 2 '屏幕中心
- Begin VB.CommandButton Command1
- Caption = "确定"
- Height = 375
- Left = 1440
- TabIndex = 3
- Top = 1200
- Width = 735
- End
- Begin VB.ComboBox Combo2
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 330
- ItemData = "frm_date.frx":030A
- Left = 2040
- List = "frm_date.frx":0332
- Style = 2 'Dropdown List
- TabIndex = 2
- Top = 600
- Width = 975
- End
- Begin VB.ComboBox Combo1
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 330
- Left = 480
- Style = 2 'Dropdown List
- TabIndex = 1
- Top = 600
- Width = 1095
- End
- Begin VB.Label Label3
- BackStyle = 0 'Transparent
- Caption = "月"
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 3120
- TabIndex = 5
- Top = 600
- Width = 375
- End
- Begin VB.Label Label2
- BackStyle = 0 'Transparent
- Caption = "年"
- BeginProperty Font
- Name = "宋体"
- Size = 12
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1680
- TabIndex = 4
- Top = 600
- Width = 495
- End
- Begin VB.Label Label1
- BackStyle = 0 'Transparent
- Caption = "请选择月份:"
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 240
- TabIndex = 0
- Top = 240
- Width = 1455
- End
- End
- Attribute VB_Name = "frm_date"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim Mydb As New ADODB.Recordset
- Dim Riqi, Riqi1, Year1, Month As String
- Private Sub Command1_Click()
- 'Dim Riqi, Riqi1, Year, Month As String
- If Combo1.Text = "" Then
- MsgBox "请选择年份!", vbOKOnly + 32, "注意!"
- Else
- If Combo2.Text = "" Then
- MsgBox "请选择月份!", vbOKOnly + 32, "注意!"
- Else
- AA = True
- Year1 = Combo1.Text
- Month = Combo2.Text
- Riqi = Year1 & "-" & Month
- Riqi1 = Year1 & "-" & Month + 1
- 'MsgBox Riqi
- 'Set Mydb = ExeCutesql("select * from 收入 where 日期 between '" & Riqi & "' and '" & Riqi1 & "' ", "")
- Cdate1 = Format(Riqi, "yyyy-mm")
- Cdate2 = Format(Riqi1, "yyyy-mm")
- Unload Me
- End If
- End If
- End Sub
- Private Sub Form_Load()
- Dim A As Integer
- A = 2000
- For I = 2000 To Int(Year(Now))
- Combo1.AddItem A
- A = A + 1
- Next I
- End Sub