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

📄 frmfortstk.frm

📁 this code is to calculate fortnight stock
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmFortStk 
   Caption         =   "Fortnight Ending Report"
   ClientHeight    =   6540
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   9360
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MDIChild        =   -1  'True
   ScaleHeight     =   6540
   ScaleWidth      =   9360
   WindowState     =   2  'Maximized
   Begin VB.TextBox txtIndOp 
      Alignment       =   1  'Right Justify
      Height          =   375
      Left            =   2760
      Locked          =   -1  'True
      TabIndex        =   22
      Top             =   1800
      Width           =   2175
   End
   Begin VB.TextBox txtImpOp 
      Alignment       =   1  'Right Justify
      Height          =   375
      Left            =   5400
      Locked          =   -1  'True
      TabIndex        =   21
      Top             =   1800
      Width           =   2175
   End
   Begin VB.TextBox txtFrom 
      Alignment       =   2  'Center
      Height          =   375
      Left            =   3000
      TabIndex        =   0
      Top             =   480
      Width           =   1575
   End
   Begin VB.TextBox txtTo 
      Alignment       =   2  'Center
      Height          =   375
      Left            =   4920
      TabIndex        =   1
      Top             =   480
      Width           =   1575
   End
   Begin VB.TextBox txtIndPurchase 
      Alignment       =   1  'Right Justify
      Height          =   375
      Left            =   2760
      Locked          =   -1  'True
      TabIndex        =   12
      Top             =   2520
      Width           =   2175
   End
   Begin VB.TextBox txtImpPurchase 
      Alignment       =   1  'Right Justify
      Height          =   375
      Left            =   5400
      Locked          =   -1  'True
      TabIndex        =   11
      Top             =   2520
      Width           =   2175
   End
   Begin VB.TextBox txtConInd 
      Alignment       =   1  'Right Justify
      Height          =   375
      Left            =   2760
      Locked          =   -1  'True
      TabIndex        =   10
      Top             =   3120
      Width           =   2175
   End
   Begin VB.TextBox txtConImp 
      Alignment       =   1  'Right Justify
      Height          =   375
      Left            =   5400
      Locked          =   -1  'True
      TabIndex        =   9
      Top             =   3120
      Width           =   2175
   End
   Begin VB.TextBox txtDespInd 
      Alignment       =   1  'Right Justify
      Height          =   375
      Left            =   2760
      Locked          =   -1  'True
      TabIndex        =   8
      Top             =   3720
      Width           =   2175
   End
   Begin VB.TextBox txtDespImp 
      Alignment       =   1  'Right Justify
      Height          =   375
      Left            =   5400
      Locked          =   -1  'True
      TabIndex        =   7
      Top             =   3720
      Width           =   2175
   End
   Begin VB.TextBox txtClInd 
      Alignment       =   1  'Right Justify
      Height          =   375
      Left            =   2760
      Locked          =   -1  'True
      TabIndex        =   6
      Top             =   4320
      Width           =   2175
   End
   Begin VB.TextBox txtClImp 
      Alignment       =   1  'Right Justify
      Height          =   375
      Left            =   5400
      Locked          =   -1  'True
      TabIndex        =   5
      Top             =   4320
      Width           =   2175
   End
   Begin VB.CommandButton cmdDisplay 
      Caption         =   "Display"
      Height          =   375
      Left            =   6720
      TabIndex        =   2
      Top             =   480
      Width           =   1095
   End
   Begin VB.CommandButton cmdClose 
      Cancel          =   -1  'True
      Caption         =   "Close"
      Height          =   495
      Left            =   6240
      TabIndex        =   4
      Top             =   4920
      Width           =   1455
   End
   Begin VB.CommandButton cmdPrint 
      Caption         =   "Print"
      Height          =   495
      Left            =   4560
      TabIndex        =   3
      Top             =   4920
      Width           =   1455
   End
   Begin VB.Label Label9 
      Caption         =   "Opening :"
      Height          =   255
      Left            =   480
      TabIndex        =   23
      Top             =   1920
      Width           =   2175
   End
   Begin VB.Label Label1 
      Caption         =   "Report Date :"
      Height          =   255
      Left            =   1920
      TabIndex        =   20
      Top             =   600
      Width           =   1095
   End
   Begin VB.Label Label2 
      Caption         =   "--"
      Height          =   135
      Left            =   4680
      TabIndex        =   19
      Top             =   600
      Width           =   255
   End
   Begin VB.Label Label3 
      Caption         =   "Indian"
      Height          =   255
      Left            =   3600
      TabIndex        =   18
      Top             =   1320
      Width           =   855
   End
   Begin VB.Label Label4 
      Caption         =   "Imported"
      Height          =   255
      Left            =   6000
      TabIndex        =   17
      Top             =   1320
      Width           =   855
   End
   Begin VB.Label Label5 
      Caption         =   "Total Purchases :"
      Height          =   255
      Left            =   480
      TabIndex        =   16
      Top             =   2640
      Width           =   2175
   End
   Begin VB.Label Label6 
      Caption         =   "Consumption of Raw Jute :"
      Height          =   255
      Left            =   480
      TabIndex        =   15
      Top             =   3240
      Width           =   2175
   End
   Begin VB.Label Label7 
      Caption         =   "Despatch of Raw Jute :"
      Height          =   255
      Left            =   480
      TabIndex        =   14
      Top             =   3840
      Width           =   2175
   End
   Begin VB.Label Label8 
      Caption         =   "Closing Stock of Raw Jute :"
      Height          =   255
      Left            =   480
      TabIndex        =   13
      Top             =   4440
      Width           =   2175
   End
End
Attribute VB_Name = "frmFortStk"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim indop As Double
Dim impop As Double
Dim indpur As Double
Dim imppur As Double
Dim indcon As Double
Dim impcon As Double
Dim inddes As Double
Dim impdes As Double
Dim indclosing As Double
Dim impclosing As Double
Private Sub cmdClose_Click()
Unload Me
End Sub

Private Sub cmdDisplay_Click()
On Error GoTo errh
OpenDb
env.con.Execute ("exec pfortnightstock '" & CDate(txtFrom.Text) & "','" & CDate(txtTo.Text) & "'," & indop & "," & impop & "," & indpur & "," & imppur & "," & indcon & "," & impcon & "," & inddes & "," & impdes & "," & indclosing & "," & impclosing)

txtIndOp.Text = Format(indop, "0.000"): txtImpOp.Text = Format(impop, "0.000")
txtIndPurchase.Text = Format(indpur, "0.000"): txtImpPurchase.Text = Format(imppur, "0.000")
txtConInd.Text = Format(indcon, "0.000"): txtConImp.Text = Format(impcon, "0.000")
txtDespInd.Text = Format(inddes, "0.000"): txtDespImp.Text = Format(impdes, "0.000")
txtClInd.Text = Format(indclosing, "0.000"): txtClImp.Text = Format(impclosing, "0.000")

Exit Sub
errh:
    MsgBox Err.Description, vbCritical
End Sub


Private Sub cmdPrint_Click()
OpenDb
On Error GoTo errh
env.con2.Execute ("drop table temp")
env.con2.Execute ("create table temp(indop numeric,impop numeric,indpur numeric,imppur numeric,indcon numeric,impcon numeric,inddes numeric,impdes numeric,indcl numeric,impcl numeric)")
env.con2.Execute ("insert into temp values(" & indop & "," & impop & "," & indpur & "," & imppur & "," & indcon & "," & impcon & "," & inddes & "," & impdes & "," & indclosing & "," & impclosing & ")")
env.con2.Execute ("drop table prmf")
env.con2.Execute ("create table prmf(rptname varchar(15),DATE1 DATETIME,DATE2 DATETIME)")
env.con2.Execute ("insert into prmf values('FORTNIGHT','" & CDate(txtFrom.Text) & "','" & CDate(txtTo.Text) & "')")

Exit Sub
errh:
    If MsgBox(Err.Description & " Continue ?", vbCritical + vbYesNo) = vbYes Then Resume Next

End Sub



Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 27 Then
    Unload Me
End If
If KeyAscii = 13 Then
    SendKeys "{tab}"
    SendKeys "{home}+{end}"
End If

End Sub


⌨️ 快捷键说明

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