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

📄 frmlocalforwarderae.frm

📁 Inventory control system
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Begin VB.Form frmLocalForwarderAE 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Local Forwarder"
   ClientHeight    =   4890
   ClientLeft      =   2235
   ClientTop       =   3150
   ClientWidth     =   6060
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4890
   ScaleWidth      =   6060
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton btnRemove 
      Height          =   275
      Left            =   450
      Picture         =   "frmLocalForwarderAE.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   19
      ToolTipText     =   "Remove"
      Top             =   2820
      Visible         =   0   'False
      Width           =   275
   End
   Begin MSDataListLib.DataCombo dcTitle 
      Height          =   315
      Left            =   390
      TabIndex        =   5
      Top             =   2340
      Width           =   3165
      _ExtentX        =   5583
      _ExtentY        =   556
      _Version        =   393216
      Style           =   2
      Text            =   ""
   End
   Begin VB.TextBox txtEntry 
      Height          =   285
      Index           =   0
      Left            =   1440
      MaxLength       =   100
      TabIndex        =   0
      Top             =   270
      Width           =   4155
   End
   Begin VB.CommandButton cmdSave 
      Caption         =   "&Save"
      Default         =   -1  'True
      Height          =   315
      Left            =   2910
      TabIndex        =   9
      Top             =   4380
      Width           =   1335
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "Cancel"
      Height          =   315
      Left            =   4320
      TabIndex        =   10
      Top             =   4380
      Width           =   1335
   End
   Begin VB.CommandButton cmdUsrHistory 
      Caption         =   "&Modification History"
      Height          =   315
      Left            =   270
      TabIndex        =   8
      Top             =   4380
      Width           =   1680
   End
   Begin VB.TextBox txtEntry 
      Height          =   285
      Index           =   1
      Left            =   1440
      MaxLength       =   100
      TabIndex        =   1
      Top             =   600
      Width           =   3735
   End
   Begin VB.TextBox txtEntry 
      Height          =   285
      Index           =   2
      Left            =   1440
      MaxLength       =   100
      TabIndex        =   2
      Top             =   930
      Width           =   2775
   End
   Begin VB.TextBox txtEntry 
      Height          =   285
      Index           =   3
      Left            =   1440
      MaxLength       =   100
      TabIndex        =   3
      Top             =   1260
      Width           =   1215
   End
   Begin VB.TextBox txtEntry 
      Height          =   285
      Index           =   4
      Left            =   1440
      MaxLength       =   100
      TabIndex        =   4
      Top             =   1590
      Width           =   2265
   End
   Begin VB.TextBox txtAmount 
      Alignment       =   1  'Right Justify
      Height          =   315
      Left            =   3690
      MaxLength       =   100
      TabIndex        =   6
      Top             =   2340
      Width           =   1215
   End
   Begin VB.CommandButton cmdAdd 
      Caption         =   "&Update"
      Height          =   315
      Left            =   4950
      TabIndex        =   7
      Top             =   2370
      Width           =   720
   End
   Begin Inventory.ctrlLiner ctrlLiner1 
      Height          =   30
      Left            =   180
      TabIndex        =   11
      Top             =   4230
      Width           =   5565
      _ExtentX        =   9816
      _ExtentY        =   53
   End
   Begin MSHierarchicalFlexGridLib.MSHFlexGrid Grid 
      Height          =   1455
      Left            =   390
      TabIndex        =   20
      Top             =   2700
      Width           =   5265
      _ExtentX        =   9287
      _ExtentY        =   2566
      _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
      AllowUserResizing=   3
      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.Label Label1 
      Caption         =   "Company"
      Height          =   285
      Left            =   360
      TabIndex        =   18
      Top             =   300
      Width           =   1005
   End
   Begin VB.Label Label2 
      Caption         =   "Area "
      Height          =   285
      Left            =   360
      TabIndex        =   17
      Top             =   630
      Width           =   1005
   End
   Begin VB.Label Label3 
      Caption         =   "City "
      Height          =   285
      Left            =   360
      TabIndex        =   16
      Top             =   960
      Width           =   1005
   End
   Begin VB.Label Label4 
      Caption         =   "Tel. No."
      Height          =   285
      Left            =   360
      TabIndex        =   15
      Top             =   1290
      Width           =   1005
   End
   Begin VB.Label Label5 
      Caption         =   "Mobile"
      Height          =   285
      Left            =   360
      TabIndex        =   14
      Top             =   1620
      Width           =   1005
   End
   Begin VB.Label Label6 
      Caption         =   "Title"
      Height          =   285
      Left            =   390
      TabIndex        =   13
      Top             =   2100
      Width           =   915
   End
   Begin VB.Label Label7 
      Alignment       =   1  'Right Justify
      Caption         =   "Amount"
      Height          =   285
      Left            =   3690
      TabIndex        =   12
      Top             =   2100
      Width           =   1185
   End
End
Attribute VB_Name = "frmLocalForwarderAE"
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 srcText              As TextBox 'Used in pop-up mode
Public srcTextAdd           As TextBox 'Used in pop-up mode -> Display the customer address
Public srcTextCP            As TextBox 'Used in pop-up mode -> Display the customer contact person
Public srcTextDisc          As Object  'Used in pop-up mode -> Display the customer Discount (can be combo or textbox)

Dim cIRowCount              As Integer
Dim HaveAction              As Boolean 'Variable used to detect if the user perform some action
Dim rs                      As New Recordset

Private Sub DisplayForEditing()
    On Error GoTo erR
    
    With rs
      txtEntry(0).Text = .Fields("LocalForwarder")
      txtEntry(1).Text = .Fields("Area")
      txtEntry(2).Text = .Fields("City")
      txtEntry(3).Text = .Fields("Telephone")
      txtEntry(4).Text = .Fields("Mobile")
    End With
    
    'Display the details
    Dim RSDetails As New Recordset

    cIRowCount = 0
    
    RSDetails.CursorLocation = adUseClient
    RSDetails.Open "SELECT * FROM qry_Local_Forwarder_Details WHERE LocalForwarderID=" & PK, CN, adOpenStatic, adLockOptimistic
    
    If RSDetails.RecordCount > 0 Then
        RSDetails.MoveFirst
        While Not RSDetails.EOF
          cIRowCount = cIRowCount + 1     'increment
            With Grid
                If .Rows = 2 And .TextMatrix(1, 3) = "" Then
                    .TextMatrix(1, 1) = RSDetails![AccTitle]
                    .TextMatrix(1, 2) = RSDetails![Amount]
                    .TextMatrix(1, 3) = RSDetails![AccountDescriptionID]
                Else
                    .Rows = .Rows + 1
                    .TextMatrix(.Rows - 1, 1) = RSDetails![AccTitle]
                    .TextMatrix(.Rows - 1, 2) = RSDetails![Amount]
                    .TextMatrix(.Rows - 1, 3) = RSDetails![AccountDescriptionID]
                End If
            End With
            RSDetails.MoveNext
        Wend
        Grid.Row = 1
        Grid.ColSel = 3
        'Set fixed cols
        If State = adStateEditMode Then
            Grid.FixedRows = Grid.Row: 'Grid.SelectionMode = flexSelectionFree
            Grid.FixedCols = 1
        End If
    End If

    RSDetails.Close
    'Clear variables
    Set RSDetails = Nothing
    
    Exit Sub
erR:
    If erR.Number = 94 Then Resume Next
    
    MsgBox "Error: " & erR.Description, vbExclamation
End Sub

Private Sub btnRemove_Click()
    'Remove selected load product
    With Grid
        'Update the record count

⌨️ 快捷键说明

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