⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rjtx.frm

📁 用于家庭收支管理
💻 FRM
字号:
VERSION 5.00
Object = "{27634C13-AC02-4C0B-A31D-18DCAA87ABF7}#2.0#0"; "DLDATE.OCX"
Begin VB.Form rjtx 
   BackColor       =   &H00F5A9A5&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "日记提醒"
   ClientHeight    =   3270
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4680
   Icon            =   "rjtx.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3270
   ScaleWidth      =   4680
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame frrj 
      BackColor       =   &H00F5A9A5&
      ForeColor       =   &H000000FF&
      Height          =   3045
      Left            =   120
      TabIndex        =   0
      Top             =   90
      Width           =   4485
      Begin VB.TextBox Text1 
         DataField       =   "日期"
         DataSource      =   "Data1"
         Height          =   345
         Left            =   2955
         TabIndex        =   6
         Top             =   300
         Visible         =   0   'False
         Width           =   1155
      End
      Begin OsenXPControls2.CommandButton CB2 
         Height          =   315
         Left            =   3075
         TabIndex        =   5
         Top             =   2535
         Width           =   600
         _ExtentX        =   1058
         _ExtentY        =   556
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Caption         =   "离开  "
         ForeColor       =   16711680
         ForeHover       =   4210688
      End
      Begin OsenXPControls2.CommandButton CB1 
         Height          =   315
         Left            =   735
         TabIndex        =   4
         Top             =   2535
         Width           =   615
         _ExtentX        =   1085
         _ExtentY        =   556
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Caption         =   "确认  "
         ForeColor       =   16711680
         ForeHover       =   4210688
      End
      Begin OsenXPControls2.CommandButton CBknow 
         Height          =   330
         Left            =   1740
         TabIndex        =   3
         Top             =   2520
         Width           =   1080
         _ExtentX        =   1905
         _ExtentY        =   582
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Caption         =   "我知道了!    "
         ForeColor       =   16711680
         ForeHover       =   4210688
      End
      Begin VB.Data Data1 
         Caption         =   "Data1"
         Connect         =   "Access"
         DatabaseName    =   ""
         DefaultCursorType=   0  '缺省游标
         DefaultType     =   2  '使用 ODBC
         Exclusive       =   0   'False
         Height          =   345
         Left            =   75
         Options         =   0
         ReadOnly        =   0   'False
         RecordsetType   =   1  'Dynaset
         RecordSource    =   ""
         Top             =   2865
         Visible         =   0   'False
         Width           =   1140
      End
      Begin VB.TextBox neirong 
         Appearance      =   0  'Flat
         BackColor       =   &H00F5A9A5&
         DataField       =   "提醒内容"
         DataSource      =   "Data1"
         ForeColor       =   &H00FF0000&
         Height          =   1500
         Left            =   450
         Locked          =   -1  'True
         MultiLine       =   -1  'True
         TabIndex        =   2
         Text            =   "rjtx.frx":0442
         Top             =   810
         Width           =   3915
      End
      Begin OsenXPControls2.OsenXPDTPicker rq1 
         Height          =   315
         Left            =   705
         TabIndex        =   1
         Top             =   330
         Width           =   1365
         _ExtentX        =   2408
         _ExtentY        =   556
         Text            =   ""
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Tahoma"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      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
         ForeColor       =   &H00404000&
         Height          =   1440
         Left            =   150
         TabIndex        =   8
         Top             =   825
         Width           =   210
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00404000&
         Height          =   210
         Left            =   195
         TabIndex        =   7
         Top             =   405
         Width           =   105
      End
   End
End
Attribute VB_Name = "rjtx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub CB1_Click()
On Error GoTo er1
    If neirong.Text = "" Then
    
        MsgBox "你没有输入计划的内容", 48, "提示"
        neirong.SetFocus
        Exit Sub
   Else
   Text1.Text = rq1.Text
    Data1.UpdateRecord
    Me.Data1.Recordset.MoveLast
    Me.Data1.Recordset.AddNew
   End If
er1:
 If Err.Number = 524 Then
 MsgBox "此日计划已存在,选择其它日子吧!", 48, "提示"
 Exit Sub
 End If
End Sub

Private Sub CB2_Click()
Unload Me
End Sub

Private Sub CBknow_Click()
If CBknow.Caption = "我知道了!    " Then
    Unload Me
   Else
      If CBknow.Caption = "明日计划    " Then
        Data1.Recordset.MoveNext
        CBknow.Caption = "我知道了!    "
       Else
          If CBknow.Caption = "日记删除    " Then
                Me.Data1.RecordSource = "select * from tx where" & "[日期]<cdate(" & "'" & Date & "')" & "order by 日期 asc"
                Me.Data1.Refresh
             If Text1.Text <> "" Then
                yn = MsgBox("是否删除已过期计划", 36, "提问")
                   If yn = 6 Then
                    
                        Data1.Recordset.MoveFirst
                        While Not Data1.Recordset.EOF
                           Data1.Recordset.Delete
            
                           Data1.Recordset.MoveNext
                        Wend
                         Data1.Refresh
                    Else
                    GoTo em
                   End If
               Else
                MsgBox "没有过期的计划可删除", 48, "提示"

               GoTo em
               End If
          End If
      End If
  
End If
em:
If te = 0 Then
   Me.Data1.RecordSource = "tx"
    Me.Data1.Refresh
        Me.Data1.Recordset.AddNew

    End If
End Sub

Private Sub Form_Activate()
If te = 0 Then
    Me.Data1.Recordset.AddNew
    
    neirong.Locked = False
Else

    neirong.Locked = True
   Data1.Recordset.MoveLast
   If Data1.Recordset.RecordCount = 2 Then
      Data1.Recordset.MoveFirst
      CBknow.Caption = "明日计划    "
          If Text1.Text = CDate(Date) Then
              Label1.Caption = "今日"
           Else
               Label1.Caption = "明日"
            End If
      End If
End If
End Sub

Private Sub Form_Load()
Data1.DatabaseName = App.Path + "/" + "shouzhi.mdb"
If te = 0 Then
   Label1.Caption = "日期:"
   rq1.Enabled = True
   Me.Data1.RecordSource = "tx"
   frrj.Caption = "计划输入"
   CBknow.Caption = "日记删除    "
   CB1.Visible = True
   CB2.Visible = True
   rq1.Value = (Year(Date) - 1900) * 365 + Month(Date) * 30 + Day(Date) + 1
Else


   Me.Data1.RecordSource = "select * from tx where" & "[日期]=cdate(" & "'" & Date & "')" & "or [日期]=cdate(" & "'" & Date + 1 & "')" & "order by 日期 asc"
   Me.Data1.Refresh
  rq1.Enabled = False
  CBknow.Caption = "我知道了!    "
  CB1.Visible = False
  CB2.Visible = False
 ' rjtx.CBknow.SetFocus
  If Text1.Text <> "" Then
       Me.Show
       rq1.Text = Text1.Text
    Else
       tt = 1
     End If
 End If
  
End Sub

Private Sub Form_Unload(Cancel As Integer)
If te = 1 Then
tt = 2
frmdj.Timer1.Enabled = False
End If
End Sub

Private Sub rq1_Change()
If te = 0 Then
   If rq1.Value <= (Year(Date) - 1900) * 365 + Month(Date) * 30 + Day(Date) And te = 0 Then
       MsgBox "日期已过,没有计划的意义", 48, "提示"
       rq1.Value = (Year(Date) - 1900) * 365 + Month(Date) * 30 + Day(Date) + 1
    End If
   Text1.Text = rq1.Text
  
End If

End Sub

Private Sub Text1_Change()
If te = 1 Then
 If Text1.Text = CDate(Date) Then
              Label1.Caption = "今日"
           Else
               Label1.Caption = "明日"
            End If
 rq1.Text = Text1.Text
End If
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -