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

📄 frmcollectionae.frm

📁 Inventory control system
💻 FRM
📖 第 1 页 / 共 4 页
字号:
      TabIndex        =   11
      Top             =   7635
      Width           =   1335
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "Cancel"
      Height          =   315
      Left            =   9480
      TabIndex        =   12
      Top             =   7635
      Width           =   1335
   End
   Begin VB.CommandButton cmdUsrHistory 
      Caption         =   "Modification History"
      Height          =   315
      Left            =   105
      TabIndex        =   10
      Top             =   7635
      Width           =   1755
   End
   Begin VB.TextBox txtEntry 
      BackColor       =   &H00E6FFFF&
      ForeColor       =   &H00000000&
      Height          =   285
      Index           =   0
      Left            =   1425
      TabIndex        =   0
      TabStop         =   0   'False
      Top             =   150
      Width           =   2490
   End
   Begin MSHierarchicalFlexGridLib.MSHFlexGrid Grid 
      Height          =   2190
      Left            =   105
      TabIndex        =   6
      Top             =   3735
      Width           =   10755
      _ExtentX        =   18971
      _ExtentY        =   3863
      _Version        =   393216
      Rows            =   0
      FixedRows       =   0
      FixedCols       =   0
      RowHeightMin    =   275
      ForeColorFixed  =   -2147483640
      BackColorSel    =   1091552
      ForeColorSel    =   16777215
      BackColorBkg    =   -2147483643
      GridColor       =   -2147483633
      GridColorFixed  =   -2147483633
      GridColorUnpopulated=   -2147483633
      AllowBigSelection=   0   'False
      FocusRect       =   0
      SelectionMode   =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _NumberOfBands  =   1
      _Band(0).Cols   =   2
      _Band(0).GridLinesBand=   1
      _Band(0).TextStyleBand=   0
      _Band(0).TextStyleHeader=   0
   End
   Begin VB.TextBox txtNCus 
      Height          =   210
      Left            =   6330
      TabIndex        =   19
      TabStop         =   0   'False
      Top             =   5235
      Visible         =   0   'False
      Width           =   75
   End
   Begin MSComCtl2.DTPicker dtpDate 
      Height          =   285
      Left            =   1425
      TabIndex        =   23
      Top             =   525
      Width           =   2505
      _ExtentX        =   4419
      _ExtentY        =   503
      _Version        =   393216
      CustomFormat    =   "MMM-dd-yyyy"
      Format          =   44630019
      CurrentDate     =   38207
   End
   Begin MSDataListLib.DataCombo dcBooking 
      Height          =   315
      Left            =   5370
      TabIndex        =   25
      Top             =   525
      Width           =   2475
      _ExtentX        =   4366
      _ExtentY        =   556
      _Version        =   393216
      Text            =   ""
   End
   Begin MSDataListLib.DataCombo dcRoute 
      Height          =   315
      Left            =   1410
      TabIndex        =   26
      Top             =   900
      Width           =   2505
      _ExtentX        =   4419
      _ExtentY        =   556
      _Version        =   393216
      Text            =   ""
   End
   Begin MSDataListLib.DataCombo dcCollection 
      Height          =   315
      Left            =   5370
      TabIndex        =   27
      Top             =   915
      Width           =   2475
      _ExtentX        =   4366
      _ExtentY        =   556
      _Version        =   393216
      Text            =   ""
   End
   Begin Inventory.ctrlLiner ctrlLiner2 
      Height          =   30
      Left            =   210
      TabIndex        =   42
      Top             =   3300
      Width           =   10785
      _ExtentX        =   19024
      _ExtentY        =   53
   End
   Begin VB.TextBox txtDate 
      Height          =   285
      Left            =   1425
      Locked          =   -1  'True
      TabIndex        =   1
      Top             =   525
      Visible         =   0   'False
      Width           =   2460
   End
   Begin VB.Label Label10 
      Alignment       =   1  'Right Justify
      Caption         =   "Status"
      Height          =   285
      Left            =   7470
      TabIndex        =   44
      Top             =   150
      Width           =   795
   End
   Begin VB.Label Label6 
      Alignment       =   1  'Right Justify
      Caption         =   "Collection"
      Height          =   255
      Left            =   4200
      TabIndex        =   31
      Top             =   900
      Width           =   1095
   End
   Begin VB.Label Label4 
      Alignment       =   1  'Right Justify
      Caption         =   "Booking"
      Height          =   255
      Left            =   4200
      TabIndex        =   30
      Top             =   525
      Width           =   1095
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      Caption         =   "Route"
      Height          =   240
      Left            =   150
      TabIndex        =   29
      Top             =   900
      Width           =   1215
   End
   Begin VB.Label Label7 
      Alignment       =   1  'Right Justify
      Caption         =   "Truck No"
      Height          =   255
      Left            =   4200
      TabIndex        =   28
      Top             =   135
      Width           =   1095
   End
   Begin VB.Label Labels 
      Caption         =   "Remarks"
      Height          =   240
      Index           =   4
      Left            =   120
      TabIndex        =   20
      Top             =   6000
      Width           =   990
   End
   Begin VB.Label Label3 
      Alignment       =   1  'Right Justify
      Caption         =   "Total Collection"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000011D&
      Height          =   240
      Left            =   7230
      TabIndex        =   18
      Top             =   6060
      Width           =   2040
   End
   Begin VB.Label Label11 
      BackStyle       =   0  'Transparent
      Caption         =   "Current Collection"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000014&
      Height          =   210
      Left            =   180
      TabIndex        =   15
      Top             =   3435
      Width           =   4365
   End
   Begin VB.Label Labels 
      Alignment       =   1  'Right Justify
      Caption         =   "Date"
      Height          =   240
      Index           =   1
      Left            =   150
      TabIndex        =   14
      Top             =   525
      Width           =   1215
   End
   Begin VB.Label Labels 
      Alignment       =   1  'Right Justify
      Caption         =   "Collection No"
      BeginProperty Font 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Index           =   0
      Left            =   150
      TabIndex        =   13
      Top             =   150
      Width           =   1215
   End
   Begin VB.Shape Shape3 
      BackColor       =   &H80000010&
      BackStyle       =   1  'Opaque
      BorderColor     =   &H80000010&
      Height          =   240
      Left            =   105
      Top             =   3435
      Width           =   10740
   End
End
Attribute VB_Name = "frmCollectionAE"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public State                As FormState 'Variable used to determine on how the form used
Public PK                   As Long 'Variable used to get what record is going to edit
Public CloseMe              As Boolean

Dim cCAmount                As Currency 'Current Collection Amount
Dim cCRowCount              As Integer

Dim HaveAction              As Boolean 'Variable used to detect if the user perform some action
Dim rs                      As New Recordset 'Main recordset for Invoice

Private Sub btnCollect_Click()
    If toNumber(txtPayment.Text) < 0 Then
        MsgBox "Please enter a valid payment.", vbExclamation
        txtPayment.SetFocus
        Exit Sub
    End If

'    Dim CurrRow As Integer
'
'    CurrRow = getFlexPos(Grid, 9, nsdClient.BoundText)

    'Add to grid
    With Grid
'        If CurrRow < 0 Then
            'Perform if the record is not exist
            If .Rows = 2 And .TextMatrix(1, 8) = "" Then
                .TextMatrix(1, 1) = nsdORNo.Text
                .TextMatrix(1, 2) = nsdClient.Text
                .TextMatrix(1, 3) = cbCA.Text
                .TextMatrix(1, 4) = cbPT.Text
                .TextMatrix(1, 5) = txtPayment.Text
                .TextMatrix(1, 6) = txtBal.Text
                .TextMatrix(1, 7) = txtRem.Text
                .TextMatrix(1, 8) = nsdClient.BoundText
                .TextMatrix(1, 9) = nsdORNo.BoundText
            Else
                .Rows = .Rows + 1
                .TextMatrix(.Rows - 1, 1) = nsdORNo.Text
                .TextMatrix(.Rows - 1, 2) = nsdClient.Text
                .TextMatrix(.Rows - 1, 3) = cbCA.Text
                .TextMatrix(.Rows - 1, 4) = cbPT.Text
                .TextMatrix(.Rows - 1, 5) = txtPayment.Text
                .TextMatrix(.Rows - 1, 6) = txtBal.Text
                .TextMatrix(.Rows - 1, 7) = txtRem.Text
                .TextMatrix(.Rows - 1, 8) = nsdClient.BoundText
                .TextMatrix(.Rows - 1, 9) = nsdORNo.BoundText

                .Row = .Rows - 1
            End If
            'Increase the record count
            cCRowCount = cCRowCount + 1
'        Else
'            If MsgBox("Payment already exist.Do you want to replace it?", vbQuestion + vbYesNo) = vbYes Then
'                .Row = CurrRow
'
'                'Restore back the collected amount
'                cCAmount = cCAmount - toNumber(Grid.TextMatrix(.RowSel, 4))
'                txtTA.Text = toMoney(cCAmount)
'
'                'Replace collection
'                .TextMatrix(CurrRow, 1) = nsdORNo.Text
'                .TextMatrix(CurrRow, 2) = nsdClient.Text
'                .TextMatrix(CurrRow, 3) = cbPT.Text
'                .TextMatrix(CurrRow, 4) = txtPayment.Text
'                .TextMatrix(CurrRow, 5) = toMoney(txtBal) - toMoney(txtPayment.Text)
'                .TextMatrix(CurrRow, 6) = txtRem.Text
'                .TextMatrix(CurrRow, 7) = nsdClient.BoundText
'                .TextMatrix(CurrRow, 8) = nsdORNo.Text
'            Else
'                Exit Sub
'            End If
'        End If
        'Add the amount to current load amount

⌨️ 快捷键说明

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