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

📄 main1.frm

📁 用于家庭收支管理
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            BackColor       =   &H00DFDAC4&
            Caption         =   "支出"
            ForeColor       =   &H00404000&
            Height          =   225
            Left            =   240
            TabIndex        =   3
            Top             =   240
            Value           =   -1  'True
            Width           =   750
         End
      End
      Begin OsenXPControls2.CommandButton CBexit 
         Height          =   345
         Index           =   1
         Left            =   2370
         TabIndex        =   30
         ToolTipText     =   "离开明细登记"
         Top             =   4005
         Width           =   675
         _ExtentX        =   1191
         _ExtentY        =   609
         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.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "日期:"
         ForeColor       =   &H00404000&
         Height          =   180
         Left            =   705
         TabIndex        =   27
         Top             =   525
         Width           =   540
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "明细备注:"
         ForeColor       =   &H00404000&
         Height          =   180
         Left            =   675
         TabIndex        =   15
         Top             =   2700
         Width           =   900
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "类别:"
         ForeColor       =   &H00404000&
         Height          =   180
         Left            =   660
         TabIndex        =   9
         Top             =   1740
         Width           =   540
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "元"
         ForeColor       =   &H00404000&
         Height          =   180
         Left            =   2700
         TabIndex        =   8
         Top             =   2235
         Width           =   180
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "金额:"
         ForeColor       =   &H00404000&
         Height          =   180
         Left            =   660
         TabIndex        =   6
         Top             =   2250
         Width           =   540
      End
   End
End
Attribute VB_Name = "frmdj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rq1 As Date
Dim rqz As Date



Private Sub Image1_Click()

End Sub

Private Sub queren_Click(Index As Integer)

End Sub

Private Sub fanhun_Click()

End Sub

Private Sub fanhui_Click()
Unload frmdj

End Sub

Private Sub cbexit_Click(Index As Integer)
Unload Me

End Sub

Private Sub CBqr_Click(Index As Integer)

End Sub

Private Sub CBqr1_Click(Index As Integer)
On Error GoTo err1

   rqz = rili.Text
    Text1.Text = rqz
    lb.Text = Combo1.Text
    If Opzhi.Value = True Then
        sz.Text = Opzhi.Caption
    Else
        sz.Text = Opshou.Caption
    End If
   frmdj.Data1.UpdateRecord
    Me.Data1.Recordset.MoveLast
    Me.Data1.Recordset.AddNew
    
   Data2.Refresh
    Data2.Recordset.MoveLast
     
err1:
If Err.Number = 524 Then
MsgBox "有些项目必须输入和选择。", 48, "提示"
Exit Sub
End If

End Sub

Private Sub Combo1_Click()
text5.SetFocus

End Sub

Private Sub CommandButton1_Click()

End Sub

Private Sub Form_Activate()
Unload cxll
Unload fxtj
mainfrm.SB1.Panels(1).Text = "收支管理明细登记,输入完后按下方的“确认”按钮,按“离开”退出添加"
 
    formname = "mxdj"
    Me.Data1.Recordset.AddNew
    Data2.Refresh
    If Text4.Text <> "" Then
      Data2.Recordset.MoveLast
     
    End If
    rili.Value = (Year(Date) - 1900) * 365 + Month(Date) * 30 + Day(Date) + 1
    rili1.Value = (Year(Date) - 1900) * 365 + Month(Date) * 30 + 2
       

    
    End Sub

Private Sub Form_GotFocus()
mainfrm.SB1.Panels(1).Text = "收支管理明细登记,输入完后按下方的“确认”按钮,按“返回”退出添加"
End Sub

Private Sub Form_Load()

formname = "mxdj"
    
    If Opzhi.Value = True Then
         b1 = 0
         Do While b1 <= 30 And szlbsz(0, b1) <> ""
         Combo1.Text = "生活用品"
         Combo1.AddItem szlbsz(0, b1)
         b1 = b1 + 1
         Loop
    Else
      b1 = 0
      Do While b1 <= 30 And szlbsz(1, b1) <> ""
      Combo1.Text = "工资收入"
      Combo1.AddItem szlbsz(1, b1)
    
     Loop
    End If
   
    
    Data1.DatabaseName = App.Path + "\shouzhi.mdb"
    Data1.RecordSource = "select * from mingxi order by 日期 asc"
     Data2.DatabaseName = App.Path + "\shouzhi.mdb"
    Data2.RecordSource = "select * from mingxi order by 日期 asc"
    
   mainfrm.Toolbar1.Buttons(4).Visible = True
mainfrm.Toolbar1.Buttons(2).Visible = True
mainfrm.Toolbar1.Buttons(3).Visible = True
mainfrm.Toolbar1.Buttons(5).Visible = True
mainfrm.Toolbar1.Buttons(6).Visible = False
mainfrm.Toolbar1.Buttons(3).Enabled = True
mainfrm.Toolbar1.Buttons(2).Enabled = True
mainfrm.Toolbar1.Buttons(5).Enabled = True
mainfrm.Toolbar1.Buttons(4).Enabled = True
'If rjtx.Text1.Text = "" Then
    ' Me.Timer1.Enabled = False
    ' End If

   ' Data2.Recordset.MoveLast
   If tt = 2 Then
     Timer1.Enabled = False
     Else
   '  OLE1.Action = 7

     End If
     For i = 0 To 1
     For j = 0 To 30
       If szlbsz(i, j) = "" Then
         Exit For
       End If
     Combo2.AddItem szlbsz(i, j)
     Next
     Next
End Sub



Private Sub Form_Unload(Cancel As Integer)
mainfrm.SB1.Panels(1).Text = ""
mainfrm.Toolbar1.Buttons(4).Visible = False
mainfrm.Toolbar1.Buttons(2).Visible = False
mainfrm.Toolbar1.Buttons(3).Visible = False
mainfrm.Toolbar1.Buttons(5).Visible = False
mainfrm.Toolbar1.Buttons(6).Visible = False





End Sub

Private Sub je_Change()

End Sub

Private Sub Label18_Click()
End Sub

Private Sub mxbz_GotFocus()
If Combo1.Text = "" Then Combo1.SetFocus

End Sub

Private Sub mxbz_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then CBqr1(0).SetFocus

End Sub

Private Sub Opshou_Click()
   Combo1.Clear
   If Opzhi.Value = True Then
         b1 = 0
         Do While b1 <= 30 And szlbsz(0, b1) <> ""
         Combo1.Text = "生活用品"
         Combo1.AddItem szlbsz(0, b1)
         b1 = b1 + 1
         Loop
    Else
      b1 = 0
      Do While b1 <= 30 And szlbsz(1, b1) <> ""
      Combo1.Text = "工资收入"
      Combo1.AddItem szlbsz(1, b1)
       b1 = b1 + 1
     Loop
    End If
End Sub

Private Sub Opzhi_Click()
 Combo1.Clear
    If Opzhi.Value = True Then
         b1 = 0
         Do While b1 <= 30 And szlbsz(0, b1) <> ""
         Combo1.Text = "生活用品"
         Combo1.AddItem szlbsz(0, b1)
         b1 = b1 + 1
         Loop
    Else
      b1 = 0
      Do While b1 <= 30 And szlbsz(1, b1) <> ""
      Combo1.Text = "工资收入"
      Combo1.AddItem szlbsz(1, b1)
     b1 = b1 + 1
     Loop
    End If
End Sub

Private Sub OsenXPDTPicker1_Change()

End Sub

Private Sub OsenXPDTPicker1_KeyPress(KeyAscii As Integer)

End Sub

Private Sub Text11_Change()

End Sub

Private Sub Text3_Change()

End Sub




Private Sub ss_Click()
 Data2.RecordSource = "select * from mingxi order by 日期 asc"
 Data2.Refresh
  rq1 = rili1.Text
  Data2.Recordset.FindFirst "[日期]=cdate(" & "'" & rq1 & "')"
If Data2.Recordset.NoMatch Then
   Data2.Recordset.MoveLast
   MsgBox "搜索记录不存在", 48, "提示"
   rili1.SetFocus

   Exit Sub
 End If
rili1.SetFocus

End Sub

Private Sub Text5_Change()
If text5.Text <> "" Then
  If Asc(Right(text5.Text, 1)) < 48 Or Asc(Right(text5.Text, 1)) > 57 Then '金额框只能输入数字Asc(Right(Text5.Text, 1))
     If Asc(Right(text5.Text, 1)) <> 46 Then
       MsgBox "只能输入数字,请重输。", 48, "提示"
       text5.SelStart = Len(text5.Text) - 1
       text5.SelLength = 1
       text5.SetFocus
      End If
  End If
 
End If


End Sub

Private Sub Text5_GotFocus()
If Combo1.Text = "" Then Combo1.SetFocus

End Sub

Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then mxbz.SetFocus

End Sub

Private Sub Text5_LostFocus()
If text5.Text <> "" Then
  If Asc(Right(text5.Text, 1)) < 48 Or Asc(Right(text5.Text, 1)) > 57 Then '金额框只能输入数字Asc(Right(Text5.Text, 1))
     If Asc(Right(text5.Text, 1)) <> 46 Then
       MsgBox "只能输入数字,请重输。", 48, "提示"
       text5.SelStart = Len(text5.Text) - 1
       text5.SelLength = 1
       text5.SetFocus
      End If
  End If
 
End If

End Sub

Private Sub UserControl11_Resize()

End Sub

Private Sub Timer1_Timer()
te = 1
Load rjtx
If tt = 1 Then

   Unload rjtx
Else
   If tt <> 2 Then
      rjtx.Show
   End If
End If
End Sub

⌨️ 快捷键说明

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