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

📄 dlgfxadd.frm

📁 本人开发的商业财务软件
💻 FRM
字号:
VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form Dialog 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "分析科目录入"
   ClientHeight    =   2550
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   6960
   Icon            =   "dlgFXAdd.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2550
   ScaleWidth      =   6960
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   3120
      TabIndex        =   5
      Top             =   480
      Width           =   1575
   End
   Begin MSDataListLib.DataCombo DataComboFXKemu 
      Height          =   330
      Left            =   360
      TabIndex        =   2
      Top             =   480
      Width           =   2295
      _ExtentX        =   4048
      _ExtentY        =   582
      _Version        =   393216
      Text            =   ""
   End
   Begin VB.CommandButton CancelButton 
      Caption         =   "取消"
      Height          =   375
      Left            =   5520
      TabIndex        =   1
      Top             =   1080
      Width           =   1215
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   375
      Left            =   5520
      TabIndex        =   0
      Top             =   240
      Width           =   1215
   End
   Begin VB.Label Label2 
      Caption         =   "金额"
      Height          =   255
      Left            =   3120
      TabIndex        =   4
      Top             =   120
      Width           =   615
   End
   Begin VB.Label Label1 
      Caption         =   "分析科目名称"
      Height          =   255
      Left            =   480
      TabIndex        =   3
      Top             =   120
      Width           =   1455
   End
End
Attribute VB_Name = "Dialog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rstFXkemu As New ADODB.Recordset
' Dim rstTemp As New ADODB.Recordset
Dim rstMaxid As New ADODB.Recordset

Dim iRecFx As Integer

Private Sub CancelButton_Click()
   Unload Me
End Sub

Private Sub DataComboFXKemu_Click(Area As Integer)
   ' MsgBox rstFXkemu!科目
End Sub

Private Sub Form_Load()
    rstMaxid.Open "select max(记录号) as idx from tempFX", pubConn
    If IsNull(rstMaxid!idx) Then
             iRecFx = 1
         Else
            iRecFx = rstMaxid!idx + 1
            End If
    rstMaxid.Close
    rstFXkemu.CursorLocation = adUseClient
    rstFXkemu.Open "select 科目,编号 from FXkemu", pubConn
    Set DataComboFXKemu.DataSource = rstFXkemu
    Set DataComboFXKemu.RowSource = rstFXkemu
    DataComboFXKemu.ListField = "科目"
    DataComboFXKemu.BoundColumn = "编号"
End Sub

Private Sub Form_Unload(Cancel As Integer)
      rstFXkemu.Close
      
End Sub

Private Sub OKButton_Click()
    Dim strKemu As String
    Dim strSql As String
    Dim PZid As Long
    strKemu = DataComboFXKemu.Text
    If strKemu = "" Then
        MsgBox "必须选择一个科目,才能正确输入"
        Exit Sub
    End If
 '‘   strSql = "select * from FXkemu where 科目='" & strKemu & "'"
 '   If rstTemp.State = adStateOpen Then rstTemp.Close
    
   ' rstTemp.Open strSql, pubConn
    PZid = InputForm.iPzid
    If PZid = 0 Then
        MsgBox "分细科目必须有对应的科目!"
        Exit Sub
    End If
    With InputForm.rstFxTemp
        .AddNew
        !科目 = DataComboFXKemu.Text
        !科目编号 = DataComboFXKemu.BoundText
        !金额 = CCur(Val(Text1.Text))
        !记录号 = iRecFx
        !PZid = PZid
        .Update
    End With
   ' rstTemp.Close
    InputForm.isSavedCurrent = False
    Unload Me
End Sub

⌨️ 快捷键说明

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