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

📄 xguser.frm

📁 这是一套农村电费计算程序的源码。能够对用户电费进行计算、查询、打印。
💻 FRM
字号:
VERSION 5.00
Begin VB.Form xguser 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "修改用户档案"
   ClientHeight    =   4725
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   2775
   Icon            =   "xguser.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4725
   ScaleWidth      =   2775
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.TextBox Text8 
      Alignment       =   2  'Center
      Height          =   375
      Left            =   1200
      TabIndex        =   16
      Top             =   3600
      Width           =   1215
   End
   Begin VB.TextBox Text7 
      Alignment       =   2  'Center
      Height          =   375
      Left            =   1200
      TabIndex        =   14
      Top             =   3120
      Width           =   1215
   End
   Begin VB.TextBox Text6 
      Alignment       =   2  'Center
      Enabled         =   0   'False
      Height          =   375
      Left            =   1200
      TabIndex        =   12
      Top             =   2640
      Width           =   1215
   End
   Begin VB.TextBox Text5 
      Alignment       =   2  'Center
      Height          =   375
      Left            =   1200
      TabIndex        =   10
      Top             =   2160
      Width           =   1215
   End
   Begin VB.TextBox Text4 
      Alignment       =   2  'Center
      Height          =   375
      Left            =   1200
      TabIndex        =   8
      Top             =   1680
      Width           =   1215
   End
   Begin VB.TextBox Text3 
      Alignment       =   2  'Center
      Enabled         =   0   'False
      Height          =   375
      Left            =   1200
      TabIndex        =   6
      Top             =   1200
      Width           =   1215
   End
   Begin VB.TextBox Text2 
      Alignment       =   2  'Center
      Enabled         =   0   'False
      Height          =   375
      Left            =   1200
      TabIndex        =   4
      Top             =   720
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Alignment       =   2  'Center
      Enabled         =   0   'False
      Height          =   375
      Left            =   1200
      TabIndex        =   2
      Top             =   240
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   375
      Left            =   1560
      TabIndex        =   1
      Top             =   4200
      Width           =   735
   End
   Begin VB.CommandButton Command1 
      Caption         =   "保 存"
      Default         =   -1  'True
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   4200
      Width           =   735
   End
   Begin VB.Label Label8 
      Caption         =   "加减电量"
      ForeColor       =   &H000000FF&
      Height          =   375
      Left            =   360
      TabIndex        =   17
      Top             =   3720
      Width           =   735
   End
   Begin VB.Label Label7 
      Caption         =   "表    损"
      Height          =   375
      Left            =   360
      TabIndex        =   15
      Top             =   3240
      Width           =   735
   End
   Begin VB.Label Label6 
      Caption         =   "上月表码"
      Height          =   375
      Left            =   360
      TabIndex        =   13
      Top             =   2760
      Width           =   735
   End
   Begin VB.Label Label5 
      Caption         =   "本月表码"
      Height          =   375
      Left            =   360
      TabIndex        =   11
      Top             =   2280
      Width           =   735
   End
   Begin VB.Label Label4 
      Caption         =   "户    名"
      Height          =   375
      Left            =   360
      TabIndex        =   9
      Top             =   1800
      Width           =   735
   End
   Begin VB.Label Label3 
      Caption         =   "户    号"
      Height          =   375
      Left            =   360
      TabIndex        =   7
      Top             =   1320
      Width           =   735
   End
   Begin VB.Label Label2 
      Caption         =   "村    名"
      Height          =   375
      Left            =   360
      TabIndex        =   5
      Top             =   840
      Width           =   735
   End
   Begin VB.Label Label1 
      Caption         =   "变压器号"
      Height          =   375
      Left            =   360
      TabIndex        =   3
      Top             =   360
      Width           =   735
   End
End
Attribute VB_Name = "xguser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public sj As Database
Public tmpsql As Recordset

Private Sub Command1_Click()
    If string1(4) = Text4 And string1(5) = Text5 And string1(7) = Text7 Then
            ab = MsgBox("数据未修改,无须存盘!", vbOKOnly + 32, "提示")
        Else
            sj.Execute "update bk set hm='" + Text4 + "',bybm=" + Text5 + ",bsh=" + Text7 + " where byqh='" + Text1 + "' and hh='" + Text3 + "';"
            sj.Close
            string1(1) = Text4
            string1(2) = Text5
            string1(3) = Text7
            Command1.Enabled = False
            boolean1(1) = True
            Erase string1
            string1(1) = Text4
            string1(2) = Text5
            string1(3) = Text7
            
            Unload Me
    End If
End Sub

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

Private Sub Form_Load()
    Text1 = string1(1)
    Text2 = string1(2)
    Text3 = string1(3)
    Text4 = string1(4)
    Text5 = string1(5)
    Text6 = string1(6)
    Text7 = string1(7)
    Text8 = string1(8)
    tmp = App.Path + "\data\cjsj.mdb"
    Set sj = OpenDatabase(tmp, False, False, ";pwd=sunlm")
End Sub

⌨️ 快捷键说明

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