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

📄 addcm.frm

📁 这是一套农村电费计算程序的源码。能够对用户电费进行计算、查询、打印。
💻 FRM
字号:
VERSION 5.00
Begin VB.Form addcm 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "增加配变(村名)"
   ClientHeight    =   4185
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   2955
   Icon            =   "addcm.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4185
   ScaleWidth      =   2955
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.TextBox Text5 
      Enabled         =   0   'False
      Height          =   375
      Left            =   1320
      TabIndex        =   10
      Top             =   1440
      Width           =   1095
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取 消"
      Height          =   375
      Left            =   1680
      TabIndex        =   9
      Top             =   3360
      Width           =   735
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确 定"
      Height          =   375
      Left            =   360
      TabIndex        =   8
      Top             =   3360
      Width           =   735
   End
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   1320
      TabIndex        =   3
      Top             =   2640
      Width           =   1095
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   1320
      TabIndex        =   2
      Top             =   2040
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Enabled         =   0   'False
      Height          =   375
      Left            =   1320
      TabIndex        =   1
      Top             =   960
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Enabled         =   0   'False
      Height          =   375
      Left            =   1320
      TabIndex        =   0
      Top             =   360
      Width           =   1095
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      Caption         =   "供 电 所"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   240
      TabIndex        =   11
      Top             =   1560
      Width           =   975
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      Caption         =   "村    名"
      Height          =   255
      Left            =   240
      TabIndex        =   7
      Top             =   2760
      Width           =   975
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      Caption         =   "配变编号"
      Height          =   255
      Left            =   240
      TabIndex        =   6
      Top             =   2160
      Width           =   975
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      Caption         =   "单位编号"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   240
      TabIndex        =   5
      Top             =   1080
      Width           =   975
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "配变(ID)"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   240
      TabIndex        =   4
      Top             =   480
      Width           =   975
   End
End
Attribute VB_Name = "addcm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public sj As Database
Public cmsj As Recordset

Private Sub Command1_Click()
    If Text3.Text <> "" Or Text4.Text <> "" Then
            tmp = "select * from cm where byqh='" & Text3.Text + "'"
            Set cmsj = sj.OpenRecordset(tmp)
            If cmsj.RecordCount = 0 Then
                tmp = "insert into cm (bh,byqh,name) values (" + "'" & Text2.Text + "','" & Text3.Text + "','" & Text4.Text + "');"
                sj.Execute tmp
                boolean1(1) = True
                string1(1) = "gds" + Text2.Text
                string1(2) = Text4.Text
                string1(3) = "byq" + Text3.Text + "F" + Text2.Text
                Print string1(3)
                Unload Me
               Else
                ab = MsgBox("配变号 " + Text3.Text + " 已存在", vbOKOnly, "提示")
            End If
        Else
           ab = MsgBox("      请 填 全 档 案      ", vbOKOnly, "提示")
    End If
End Sub

Private Sub Command2_Click()
    boolean1(1) = False
    Unload Me
End Sub

Private Sub Form_Load()
    tmp = App.Path + "\data\cjsj.mdb"
    Set sj = OpenDatabase(tmp, False, False, ";pwd=sunlm")
    Text2.Text = string1(1)
    Text5.Text = string1(2)
End Sub

⌨️ 快捷键说明

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