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

📄 frm客户编印.frm

📁 此为我2001年为东莞建发楦头开发的企业管理软件他们使用至今,望斑竹指教! 其他会员最好不要随意下载,需经斑竹同意或我本人同意,谢谢!
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmclientprint 
   Caption         =   "客户资料打印"
   ClientHeight    =   2925
   ClientLeft      =   2880
   ClientTop       =   2895
   ClientWidth     =   5865
   Icon            =   "frm客户编印.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2925
   ScaleWidth      =   5865
   Begin VB.CommandButton cmdok 
      Caption         =   "确认"
      Height          =   340
      Left            =   1800
      TabIndex        =   8
      Top             =   2400
      UseMaskColor    =   -1  'True
      Width           =   975
   End
   Begin VB.CommandButton cmdcancel 
      Caption         =   "取消"
      Height          =   340
      Left            =   3240
      TabIndex        =   7
      Top             =   2400
      UseMaskColor    =   -1  'True
      Width           =   975
   End
   Begin VB.Frame Frame1 
      Caption         =   "参数选项"
      ForeColor       =   &H00000080&
      Height          =   2055
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   5535
      Begin VB.ComboBox cmbTown 
         Height          =   300
         ItemData        =   "frm客户编印.frx":030A
         Left            =   1800
         List            =   "frm客户编印.frx":0320
         Style           =   2  'Dropdown List
         TabIndex        =   9
         Top             =   960
         Width           =   1455
      End
      Begin VB.TextBox txtfields 
         Height          =   270
         Index           =   0
         Left            =   1800
         MaxLength       =   10
         TabIndex        =   3
         Top             =   1380
         Width           =   1215
      End
      Begin VB.TextBox txtfields 
         Height          =   270
         Index           =   1
         Left            =   3600
         MaxLength       =   10
         TabIndex        =   2
         Top             =   1380
         Width           =   1095
      End
      Begin VB.ComboBox cmbtype1 
         Height          =   300
         ItemData        =   "frm客户编印.frx":0360
         Left            =   1800
         List            =   "frm客户编印.frx":0362
         Style           =   2  'Dropdown List
         TabIndex        =   1
         Top             =   480
         Width           =   1455
      End
      Begin VB.Label lbl1 
         Caption         =   "客户范围:"
         Height          =   255
         Index           =   1
         Left            =   480
         TabIndex        =   10
         Top             =   960
         Width           =   975
      End
      Begin VB.Label lbl1 
         Caption         =   "客户方向:"
         Height          =   255
         Index           =   0
         Left            =   480
         TabIndex        =   6
         Top             =   600
         Width           =   975
      End
      Begin VB.Label lbl1 
         Caption         =   "客户编号:"
         Height          =   255
         Index           =   2
         Left            =   480
         TabIndex        =   5
         Top             =   1365
         Width           =   975
      End
      Begin VB.Label lbl 
         Caption         =   "到:"
         ForeColor       =   &H000000FF&
         Height          =   255
         Index           =   0
         Left            =   3240
         TabIndex        =   4
         Top             =   1380
         Width           =   375
      End
   End
End
Attribute VB_Name = "frmclientprint"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmbtype1_Click()
    If cmbType1 <> "全部" Then
        Set clitb = New Recordset
        
        cmbTown.Clear
        cmbTown.AddItem "全部"
        clitb.Open "select distinct town from client where chflag=0 and fangxiang='" & cmbType1.Text & "'", db, adOpenStatic, adLockOptimistic
        For i = 1 To clitb.RecordCount
            If Not IsNull(clitb!town) Then cmbTown.AddItem clitb!town
            clitb.MoveNext
        Next
        cmbTown.ListIndex = 0
        clitb.Close
        
        Set clitb = Nothing
    End If
End Sub

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdok_Click()
Me.MousePointer = 11
    If txtfields(0).Text <> "" And txtfields(1).Text <> "" Then
    Else
      MsgBox "资料不能为空!!!", vbCritical + vbOKOnly, "提示信息"
      Exit Sub
    End If

    sqlcc1 = "客号从:" & "[" & txtfields(0).Text & "]" & "至:" & "[" & txtfields(1).Text & "]"

    If cmbType1.Text = "全部" Then
       If cmbTown.Text = "全部" Then
            sqlcc2 = "select * from client where chflag=0 and  clino>=" & "'" & txtfields(0).Text & "'" & " and " & "clino<=" & "'" & txtfields(1).Text & "'" & " order by fangxiang,tele"
       Else
            sqlcc2 = "select * from client where chflag=0 and  town=" & "'" & cmbTown.Text & "'" & " and clino>=" & "'" & txtfields(0).Text & "'" & " and " & "clino<=" & "'" & txtfields(1).Text & "'" & " order by fangxiang,tele"
       End If
    Else
       If cmbTown.Text = "全部" Then
            sqlcc2 = "select * from client where chflag=0 and  fangxiang=" & "'" & cmbType1.Text & "'" & " and clino>=" & "'" & txtfields(0).Text & "'" & " and " & "clino<=" & "'" & txtfields(1).Text & "'" & " order by fangxiang,tele"
       Else
            sqlcc2 = "select * from client where chflag=0 and  fangxiang=" & "'" & cmbType1.Text & "'" & " and town=" & "'" & cmbTown.Text & "'" & " and clino>=" & "'" & txtfields(0).Text & "'" & " and " & "clino<=" & "'" & txtfields(1).Text & "'" & " order by fangxiang,tele"
       End If
    End If
    
   Dim rs As Recordset
   Set rs = New Recordset
   rs.Open sqlcc2, db, adOpenStatic, adLockOptimistic
   If rs.RecordCount > 0 Then
        rs.Close
        Set rs = Nothing
        ARclient.Show 1
   Else
        rs.Close
        Set rs = Nothing
        MsgBox "不能找到相应的记录!!!", vbCritical + vbOKOnly, MSG2
        Me.MousePointer = 0
        Exit Sub
   End If
Me.MousePointer = 0
End Sub

Private Sub Form_Activate()
cmbType1.SetFocus
End Sub

Private Sub Form_Load()
    txtfields(0).Text = "0"
    txtfields(1).Text = "ZZ"
    cmbType1.AddItem "全部"
    Dim clitb As Recordset
    Set clitb = New Recordset
    clitb.Open "select distinct fangxiang from client", db, adOpenStatic, adLockOptimistic
    For i = 1 To clitb.RecordCount
        cmbType1.AddItem clitb!fangxiang
        clitb.MoveNext
    Next
    cmbType1.ListIndex = 0
    clitb.Close
        
    cmbTown.Clear
    cmbTown.AddItem "全部"
    clitb.Open "select distinct town from client", db, adOpenStatic, adLockOptimistic
    For i = 1 To clitb.RecordCount
        If Not IsNull(clitb!town) Then cmbTown.AddItem clitb!town
        clitb.MoveNext
    Next
    cmbTown.ListIndex = 0
    clitb.Close
    
    Set clitb = Nothing
    
    
    Set clitb = Nothing
End Sub

Private Sub Form_Resize()
'On Error Resume Next
'Me.Top = 0
'Me.Left = 50
End Sub

Private Sub txtfields_GotFocus(Index As Integer)
    Call gotfocus(txtfields(Index))
End Sub

Private Sub txtfields_KeyPress(Index As Integer, KeyAscii As Integer)
     Call EnterDown(KeyAscii, txtfields, cmdok, Index, txtfields.Count - 1)
End Sub

Private Sub txtfields_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
    If Button = 1 Then Call gotfocus(txtfields(Index))
End Sub


⌨️ 快捷键说明

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