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

📄 form1.frm

📁 一、 设计构想: 为减轻财政局非税收入管理处票据准购薄管理工作量
💻 FRM
📖 第 1 页 / 共 3 页
字号:
         ItemData        =   "Form1.frx":8C12
         Left            =   9240
         List            =   "Form1.frx":8C22
         TabIndex        =   12
         Text            =   "行政"
         Top             =   1800
         Width           =   2535
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   1320
         TabIndex        =   0
         Text            =   "Combo1"
         Top             =   360
         Width           =   975
      End
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         Height          =   270
         Index           =   7
         Left            =   1320
         TabIndex        =   10
         Top             =   1800
         Width           =   2535
      End
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         Height          =   270
         Index           =   5
         Left            =   5640
         TabIndex        =   8
         Top             =   1320
         Width           =   1935
      End
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         Height          =   270
         Index           =   4
         Left            =   1320
         TabIndex        =   7
         Top             =   1320
         Width           =   2535
      End
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         Height          =   270
         Index           =   3
         Left            =   5640
         TabIndex        =   5
         Top             =   840
         Width           =   1935
      End
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         Height          =   270
         Index           =   2
         Left            =   1320
         TabIndex        =   4
         Top             =   840
         Width           =   2535
      End
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         Height          =   270
         Index           =   6
         Left            =   9240
         TabIndex        =   9
         Top             =   1320
         Width           =   2535
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   270
         Left            =   9960
         TabIndex        =   6
         Top             =   840
         Width           =   1575
         _ExtentX        =   2778
         _ExtentY        =   476
         _Version        =   393216
         Format          =   23658497
         CurrentDate     =   38445
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "票据名称"
         Height          =   255
         Index           =   17
         Left            =   360
         TabIndex        =   42
         Top             =   1980
         Width           =   1575
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "单位编号"
         Height          =   255
         Index           =   0
         Left            =   4440
         TabIndex        =   41
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "单位性质"
         Height          =   255
         Index           =   11
         Left            =   8160
         TabIndex        =   33
         Top             =   1800
         Width           =   1095
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "主管部门"
         Height          =   255
         Index           =   10
         Left            =   360
         TabIndex        =   32
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "申请领购"
         Height          =   255
         Index           =   9
         Left            =   360
         TabIndex        =   31
         Top             =   1800
         Width           =   1575
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "联系电话"
         Height          =   255
         Index           =   8
         Left            =   8160
         TabIndex        =   30
         Top             =   1320
         Width           =   1095
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "联系人"
         Height          =   255
         Index           =   7
         Left            =   4440
         TabIndex        =   29
         Top             =   1320
         Width           =   1095
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "单位地址"
         Height          =   255
         Index           =   6
         Left            =   360
         TabIndex        =   26
         Top             =   1320
         Width           =   1095
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "拨款方式"
         Height          =   255
         Index           =   5
         Left            =   4440
         TabIndex        =   19
         Top             =   1800
         Width           =   1095
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "收费许可证有效期限"
         Height          =   255
         Index           =   4
         Left            =   8160
         TabIndex        =   18
         Top             =   840
         Width           =   1935
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "收费许可证号"
         Height          =   255
         Index           =   3
         Left            =   4440
         TabIndex        =   17
         Top             =   840
         Width           =   1095
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "机构代码"
         Height          =   255
         Index           =   2
         Left            =   360
         TabIndex        =   16
         Top             =   840
         Width           =   1095
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "单位名称"
         Height          =   255
         Index           =   1
         Left            =   8160
         TabIndex        =   15
         Top             =   360
         Width           =   1095
      End
   End
   Begin VB.Image Image2 
      Height          =   855
      Left            =   9720
      Picture         =   "Form1.frx":8C3E
      Top             =   15
      Width           =   750
   End
   Begin VB.Image Image1 
      Height          =   645
      Left            =   3240
      Picture         =   "Form1.frx":9A47
      Top             =   0
      Width           =   3585
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim conn As ADODB.Connection
Dim rs, rs1 As ADODB.Recordset
Dim SQL, connstr As String
Dim dwID, xmID As Long

Private Sub Check1_Click()
If Check1.Value = 0 Then
DTPicker1.Enabled = False
Else
DTPicker1.Enabled = True
End If
End Sub

Private Sub Combo1_Click()
On Error Resume Next
Combo3.Clear
SQL = "select * from zgbm where cataid=" & Combo1.ItemData(Combo1.ListIndex) & " order by num"
rs.Open SQL, conn, 1, 1
    Do Until rs.EOF
    Combo3.AddItem rs("zgbm")
    Combo3.ItemData(Combo3.NewIndex) = rs("id")
    rs.MoveNext
    Loop
rs.Close
End Sub

Private Sub Combo3_Click()
On Error Resume Next
SQL = "select * from zgbm where id=" & Combo3.ItemData(Combo3.ListIndex)
rs.Open SQL, conn, 1, 1
If Not (rs.EOF) Then
If Len(Text1(0).Text) >= 4 Then
Text1(0).Text = rs("dwbm") & Right(Text1(0).Text, Len(Text1(0).Text) - 4)
Else
Text1(0).Text = rs("dwbm")
End If
End If
rs.Close
End Sub

Private Sub Command1_Click()
On Error Resume Next
If Len(Combo3.List(Combo3.ListIndex)) = 0 Then
MDIForm1.StatusBar1.Panels(1).Text = "未选择主管部门"
Exit Sub
End If
If Text1(1).Text = "" Or Text1(0).Text = "" Then
MDIForm1.StatusBar1.Panels(1).Text = "未填写单位名称或编号"
Exit Sub
End If
If dwID = 0 Then
    SQL = "select * from jbxx where dwbh='" & Text1(0).Text & "'"
    rs.Open SQL, conn, 1, 1
    If Not (rs.EOF) Then
    MDIForm1.StatusBar1.Panels(1).Text = "单位编号已存在"
    rs.Close
    Exit Sub
    End If
    rs.Close
End If
    SQL = "select * from jbxx where id=" & dwID
    rs.Open SQL, conn, 1, 3
    If rs.EOF Then
    rs.AddNew
    rs("addtimes") = Now()
    rs("dwbh") = Text1(0).Text
    End If
    rs("dwmc") = Text1(1).Text
    rs("jgdm") = Text1(2).Text
    rs("zgbm") = Combo3.List(Combo3.ListIndex)
    rs("sfxk") = Text1(3).Text
    If Check1.Value = 0 Then
    rs("xkqx") = "9999-12-31"
    Else
    rs("xkqx") = DTPicker1.Value
    End If
    rs("dwdz") = Text1(4).Text
    rs("lxr") = Text1(5).Text
    rs("lxdh") = Text1(6).Text
    rs("pjmc") = Text1(7).Text
    rs("bkfs") = Combo4.List(Combo4.ListIndex)
    rs("dwxz") = Combo2.List(Combo2.ListIndex)
    rs.Update
    rs.Close
    If Err.Number = 0 Then
    SQL = "select * from jbxx where dwbh='" & Text1(0).Text & "'"
    rs.Open SQL, conn, 1, 1
        If Not (rs.EOF) Then
        dwID = CLng(rs("id"))
        Pub_dwID = dwID
        Frame1.Caption = "基本信息-更新信息"
        Frame2.Visible = True
        ListView1.Visible = True
    MDIForm1.StatusBar1.Panels(1).Text = "单位操作成功"
        End If
        rs.Close
    Else
        MsgBox ("操作失败")
    End If
End Sub

⌨️ 快捷键说明

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