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

📄 客户管理.frm

📁 客户信息管理系统10客户信息管理系统10
💻 FRM
📖 第 1 页 / 共 5 页
字号:
            Caption         =   "下一条"
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "尾记录"
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "查询"
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "添加"
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "编辑"
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "删除"
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "返回"
         EndProperty
         BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "打印"
            Style           =   5
            BeginProperty ButtonMenus {66833FEC-8583-11D1-B16A-00C0F0283628} 
               NumButtonMenus  =   2
               BeginProperty ButtonMenu1 {66833FEE-8583-11D1-B16A-00C0F0283628} 
                  Key             =   "all"
                  Text            =   "打印全部"
               EndProperty
               BeginProperty ButtonMenu2 {66833FEE-8583-11D1-B16A-00C0F0283628} 
                  Key             =   "rsls"
                  Text            =   "打印查询到的"
               EndProperty
            EndProperty
         EndProperty
      EndProperty
      BorderStyle     =   1
   End
   Begin VB.Label 当前记录 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "当前记录"
      Height          =   300
      Left            =   6960
      TabIndex        =   89
      Top             =   840
      Width           =   1215
   End
   Begin VB.Label 当前页记录 
      Caption         =   "当前页记录"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   5520
      TabIndex        =   88
      Top             =   840
      Width           =   1335
   End
   Begin VB.Label 页 
      Caption         =   "页"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   13680
      TabIndex        =   87
      Top             =   960
      Width           =   375
   End
   Begin VB.Label Pageanumber 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "数"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   12720
      TabIndex        =   86
      Top             =   960
      Width           =   735
   End
   Begin VB.Label 总共 
      Caption         =   "总共"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   12120
      TabIndex        =   85
      Top             =   960
      Width           =   495
   End
   Begin VB.Label 查询 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Height          =   300
      Left            =   4080
      TabIndex        =   8
      Top             =   840
      Width           =   1215
   End
   Begin VB.Label 查询结果 
      Alignment       =   2  'Center
      Caption         =   "查询结果"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   2880
      TabIndex        =   7
      Top             =   840
      Width           =   1095
   End
   Begin VB.Label 总数 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Height          =   300
      Left            =   1440
      TabIndex        =   6
      Top             =   840
      Width           =   1215
   End
   Begin VB.Label 总数记录 
      Alignment       =   2  'Center
      Caption         =   "总数记录"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   0
      Left            =   240
      TabIndex        =   5
      Top             =   840
      Width           =   1095
   End
End
Attribute VB_Name = "客户管理"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim RS As ADODB.Recordset
Dim volRS As ADODB.Recordset
Dim lsRS As ADODB.Recordset
Dim RS1 As ADODB.Recordset
Dim RS2 As ADODB.Recordset
Dim adoPrimaryRS As ADODB.Recordset
Dim lCurrentPage As Long
Dim lslCurrentPage As Long
Dim diydate As String
Dim olddate As String
Dim TXT As String
Dim lPageCount As Long
Dim nPageSize As Integer
Dim lCount As Long
Dim lslPageCount As Long
Dim lsnPageSize As Integer
Dim lslCount As Long

Private Sub Form_Load()

Set RS = New ADODB.Recordset
RS.CursorType = adOpenStatic
RS.CursorLocation = adUseClient
RS.LockType = adLockPessimistic
RS.Open "SELECT * FROM 客户管理", Conn

Set adoPrimaryRS = New ADODB.Recordset
adoPrimaryRS.CursorType = adOpenStatic
adoPrimaryRS.CursorLocation = adUseClient
adoPrimaryRS.LockType = adLockPessimistic
adoPrimaryRS.Open "SELECT * FROM 客户管理", Conn

Set lsRS = New ADODB.Recordset
lsRS.CursorType = adOpenStatic
lsRS.CursorLocation = adUseClient
lsRS.LockType = adLockPessimistic
lsRS.Open "SELECT * FROM ls客户管理", Conn


diydate = Date
olddate = "2009-4-1"
If diydate > olddate Then
MsgBox ("试用已过期,请联系开发者购买正版,联系方式15877258593,QQ253478821")
End If

lslCurrentPage = 1
lCurrentPage = 1
Call Loadcontrol(lCurrentPage)
End Sub


Private Sub Loadcontrol(lPage As Long)

Set lsRS = New ADODB.Recordset
lsRS.CursorType = adOpenStatic
lsRS.CursorLocation = adUseClient
lsRS.LockType = adLockPessimistic
lsRS.Open "SELECT * FROM ls客户管理", Conn

Set RS1 = New ADODB.Recordset '新建一个recordset
RS1.CursorType = adOpenStatic
RS1.CursorLocation = adUseClient
RS1.LockType = adLockPessimistic

Set adoPrimaryRS = New ADODB.Recordset
adoPrimaryRS.CursorType = adOpenStatic
adoPrimaryRS.CursorLocation = adUseClient
adoPrimaryRS.LockType = adLockPessimistic

''每页显示的纪录
nPageSize = 10
adoPrimaryRS.Open "SELECT * FROM 客户管理", Conn
adoPrimaryRS.PageSize = nPageSize

''页数
lPageCount = adoPrimaryRS.PageCount
If lCurrentPage > lPageCount Then
lCurrentPage = lPageCount
End If
adoPrimaryRS.AbsolutePage = lCurrentPage

''添加字段名称
For lCount = 0 To adoPrimaryRS.Fields.Count - 1
RS1.Fields.Append adoPrimaryRS.Fields(lCount).Name, adVarChar, adoPrimaryRS.Fields(lCount).DefinedSize
Next
''打开记录集
RS1.Open
''将指定记录数循环添加到rs中
For lCount = 1 To nPageSize
RS1.AddNew
For i = 0 To 21
RS1.Fields(i) = adoPrimaryRS.Fields(i)
'objrs!编号 = adoPrimaryRS!编号
'objrs!姓名 = adoPrimaryRS!姓名
Next
adoPrimaryRS.MoveNext
If adoPrimaryRS.EOF And lPage = adoPrimaryRS.PageCount Then
Exit For
End If


Next
''在文本框显示页数
Pageanumber = adoPrimaryRS.PageCount
'txtPage = lPage & "/" & adoPrimaryRS.PageCount
txtPage = lPage
当前记录.Caption = RS1.RecordCount
For i = 0 To 21
    Set Text1(i).DataSource = RS1
    Text1(i).Locked = True
Next
Text1(0).DataField = "姓名"
Text1(1).DataField = "地址"
Text1(2).DataField = "邮编"
Text1(3).DataField = "电话"
Text1(4).DataField = "传真"
Text1(5).DataField = "开户"
Text1(6).DataField = "账号"
Text1(7).DataField = "税号"
Text1(8).DataField = "联系人"
Text1(9).DataField = "经办人"
Text1(10).DataField = "使用人"
Text1(11).DataField = "联系人部门"
Text1(12).DataField = "经办人部门"
Text1(13).DataField = "使用人部门"
Text1(14).DataField = "联系人职务"
Text1(15).DataField = "经办人职务"
Text1(16).DataField = "使用人电话"
Text1(17).DataField = "联系人电话"
Text1(18).DataField = "经办人电话"
Text1(19).DataField = "编辑日期"
Text1(20).DataField = "附注"
Text1(21).DataField = "编号"
''绑定
Set 客户Grid.DataSource = RS1
总数.Caption = adoPrimaryRS.RecordCount
now_find = True
now_add = True

End Sub

Private Sub lsLoadcontrol(lslPage As Long)

Set lsRS = New ADODB.Recordset
lsRS.CursorType = adOpenStatic
lsRS.CursorLocation = adUseClient
lsRS.LockType = adLockPessimistic
lsRS.Open "SELECT * FROM ls客户管理", Conn

Set RS2 = New ADODB.Recordset '新建一个recordset
RS2.CursorType = adOpenStatic
RS2.CursorLocation = adUseClient
RS2.LockType = adLockPessimistic

''每页显示的纪录
lsnPageSize = 10
lsRS.PageSize = lsnPageSize

''页数
lslPageCount = lsRS.PageCount
If lslCurrentPage > lslPageCount Then
lslCurrentPage = lslPageCount
End If
lsRS.AbsolutePage = lslCurrentPage

''添加字段名称
For lslCount = 0 To lsRS.Fields.Count - 1
RS2.Fields.Append lsRS.Fields(lslCount).Name, adVarChar, lsRS.Fields(lslCount).DefinedSize
Next
RS2.Open

''将指定记录数循环添加到rs中
Do While RS2.EOF = False
RS2.Delete
RS2.MoveNext
RS2.Update
Loop

For lslCount = 1 To lsnPageSize
RS2.AddNew
For i = 0 To 21
RS2.Fields(i) = lsRS.Fields(i)
'objrs!编号 = adoPrimaryRS!编号
'objrs!姓名 = adoPrimaryRS!姓名
Next
lsRS.MoveNext

If lsRS.EOF And lslPage = lsRS.PageCount Then
Exit For
End If

Next
''在文本框显示页数
Pageanumber = lsRS.PageCount
'txtPage = lPage & "/" & adoPrimaryRS.PageCount
txtPage = lslPage
当前记录.Caption = RS2.RecordCount
For i = 0 To 21
    Set Text1(i).DataSource = RS2
    Text1(i).Locked = True
Next
Text1(0).DataField = "姓名"
Text1(1).DataField = "地址"

⌨️ 快捷键说明

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