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

📄 rmbmem.frm

📁 利用Visual basic 构建POS进销存源码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form RMBMEM 
   Caption         =   "会员查询报表"
   ClientHeight    =   2445
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5775
   LinkTopic       =   "Form1"
   ScaleHeight     =   2445
   ScaleWidth      =   5775
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Caption         =   "查询"
      Height          =   2175
      Left            =   100
      TabIndex        =   0
      Top             =   120
      Width           =   5600
      Begin VB.TextBox LB52 
         Height          =   270
         Left            =   2280
         TabIndex        =   16
         Top             =   1800
         Width           =   975
      End
      Begin VB.TextBox LB51 
         Height          =   270
         Left            =   960
         TabIndex        =   14
         Top             =   1800
         Width           =   975
      End
      Begin VB.TextBox LB42 
         Height          =   270
         Left            =   2280
         TabIndex        =   12
         Top             =   1440
         Width           =   975
      End
      Begin VB.TextBox LB41 
         Height          =   270
         Left            =   960
         TabIndex        =   10
         Top             =   1440
         Width           =   975
      End
      Begin VB.CommandButton BTN_QUT 
         Caption         =   "关闭"
         Height          =   500
         Left            =   3840
         TabIndex        =   9
         Top             =   1440
         Width           =   1500
      End
      Begin VB.TextBox LB31 
         Height          =   270
         Left            =   960
         TabIndex        =   5
         Top             =   1080
         Width           =   975
      End
      Begin VB.CommandButton BTN_CLR 
         Caption         =   "清除"
         Height          =   500
         Left            =   3840
         TabIndex        =   4
         Top             =   840
         Width           =   1500
      End
      Begin VB.TextBox LB21 
         Height          =   270
         Left            =   960
         TabIndex        =   3
         Top             =   720
         Width           =   975
      End
      Begin VB.TextBox LB11 
         Height          =   270
         Left            =   960
         TabIndex        =   2
         Top             =   360
         Width           =   975
      End
      Begin VB.CommandButton BTN_SEA 
         Caption         =   "查询"
         Height          =   500
         Left            =   3840
         TabIndex        =   1
         Top             =   240
         Width           =   1500
      End
      Begin VB.Label Label4 
         Caption         =   "°"
         Height          =   195
         Left            =   2040
         TabIndex        =   17
         Top             =   1845
         Width           =   315
      End
      Begin VB.Label Label3 
         Caption         =   "总消费额"
         Height          =   195
         Left            =   120
         TabIndex        =   15
         Top             =   1845
         Width           =   795
      End
      Begin VB.Label Label2 
         Caption         =   "°"
         Height          =   195
         Left            =   2040
         TabIndex        =   13
         Top             =   1478
         Width           =   315
      End
      Begin VB.Label Label1 
         Caption         =   "会员等级"
         Height          =   195
         Left            =   120
         TabIndex        =   11
         Top             =   1485
         Width           =   795
      End
      Begin VB.Label Label9 
         Caption         =   "现居电话"
         Height          =   195
         Left            =   120
         TabIndex        =   8
         Top             =   1125
         Width           =   795
      End
      Begin VB.Label Label8 
         Caption         =   "中文姓名"
         Height          =   195
         Left            =   120
         TabIndex        =   7
         Top             =   758
         Width           =   795
      End
      Begin VB.Label Label7 
         Caption         =   "会员编号"
         Height          =   195
         Left            =   120
         TabIndex        =   6
         Top             =   398
         Width           =   795
      End
   End
End
Attribute VB_Name = "RMBMEM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public CN As New ADODB.Connection, RS As New ADODB.Recordset
Public SQL As String
Const DBPATH = "./POS.MDB"
Const ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBPATH

Private Sub BTN_CLR_Click()
  LB11.Text = ""
  LB21.Text = ""
  LB31.Text = ""
  LB41.Text = ""
  LB42.Text = ""
  LB51.Text = ""
  LB52.Text = ""

End Sub

Private Sub BTN_QUT_Click()
  Unload RMBMEM

End Sub

Private Sub BTN_SEA_Click()
  DR_BMEM.Sections("ReportHeader").Controls("LB_TITLE").Caption = RMBMEM.Caption

  S = "SELECT * FROM BMEM "
  S = S & "WHERE BMENO IS NOT NULL"
  If (LB11.Text <> "") Then S = S & " AND BMENO LIKE '%" + LB11.Text + "%' "
  If (LB21.Text <> "") Then S = S & " AND BMNAM LIKE '%" + LB21.Text + "%' "
  If (LB31.Text <> "") Then S = S & " AND BMTL1 LIKE '%" + LB31.Text + "%' "
  
  If (LB41.Text <> "") And (LB42.Text <> "") Then S = S & " AND ( BMLVE >= " + LB41.Text + " AND BMLVE <= " + LB42.Text + " ) "
  If (LB41.Text <> "") And (LB42.Text = "") Then S = S & " AND BMLVE >= " + LB41.Text + " "
  If (LB41.Text = "") And (LB42.Text <> "") Then S = S & " AND BMLVE <= " + LB42.Text + " "
  
  If (LB51.Text <> "") And (LB52.Text <> "") Then S = S & " AND ( BMBTO >= " + LB51.Text + " AND BMBTO <= " + LB52.Text + " ) "
  If (LB51.Text <> "") And (LB52.Text = "") Then S = S & " AND BMBTO >= " + LB51.Text + " "
  If (LB51.Text = "") And (LB52.Text <> "") Then S = S & " AND BMBTO <= " + LB52.Text + " "
  
  
  RS.Open S, ConnString, , , adCmdText

  Set DR_BMEM.DataSource = RS
  
  DR_BMEM.Sections("DETAIL").Controls("TEXT1").DataField = "BMENO"
  DR_BMEM.Sections("DETAIL").Controls("TEXT2").DataField = "BMNAM"
  DR_BMEM.Sections("DETAIL").Controls("TEXT3").DataField = "BMBTH"
  DR_BMEM.Sections("DETAIL").Controls("TEXT4").DataField = "BMTL1"
  DR_BMEM.Sections("DETAIL").Controls("TEXT5").DataField = "BMAD1"
  DR_BMEM.Sections("DETAIL").Controls("TEXT6").DataField = "BMLVE"
  DR_BMEM.Sections("DETAIL").Controls("TEXT7").DataField = "BMBTO"
  DR_BMEM.Sections("DETAIL").Controls("TEXT8").DataField = "BMDAT"

  DR_BMEM.Show vbModal
  RS.Close

End Sub

Private Sub Form_Load()
    Load DR_BMEM
    CN.Open ConnString

End Sub

Private Sub Form_Unload(Cancel As Integer)
  Unload DR_BMEM
  CN.Close

End Sub

⌨️ 快捷键说明

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