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

📄 oil refining.frm

📁 This project is to design the automated system for the inventory of Al-Ahmad Cotton and Oil Mills si
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   27
         Top             =   720
         Width           =   1815
      End
      Begin VB.Label Label2 
         BackColor       =   &H00C0C0FF&
         BackStyle       =   0  'Transparent
         Caption         =   "Castic Soda Consumed"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   26
         Top             =   1200
         Width           =   2535
      End
      Begin VB.Label Label3 
         BackColor       =   &H00C0C0FF&
         BackStyle       =   0  'Transparent
         Caption         =   "Refine Oil Produced"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   25
         Top             =   1680
         Width           =   2175
      End
      Begin VB.Label Label4 
         BackColor       =   &H00C0C0FF&
         BackStyle       =   0  'Transparent
         Caption         =   "Oil Dirt Produced"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   24
         Top             =   2160
         Width           =   1815
      End
      Begin VB.Label Label5 
         BackColor       =   &H00C0C0FF&
         BackStyle       =   0  'Transparent
         Caption         =   "Shortage"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   23
         Top             =   2640
         Width           =   1815
      End
      Begin VB.Label Label6 
         BackColor       =   &H00C0C0FF&
         BackStyle       =   0  'Transparent
         Caption         =   "Kilograms (Kgs)"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   2760
         TabIndex        =   22
         Top             =   240
         Width           =   1695
      End
      Begin VB.Label Label7 
         BackColor       =   &H00C0C0FF&
         BackStyle       =   0  'Transparent
         Caption         =   "Mounds (Mn)"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   5280
         TabIndex        =   21
         Top             =   240
         Width           =   1575
      End
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H80000013&
      Height          =   855
      Left            =   600
      TabIndex        =   17
      Top             =   1200
      Width           =   7575
      Begin VB.TextBox refno 
         BackColor       =   &H00FFFFFF&
         Height          =   345
         Index           =   0
         Left            =   5280
         Locked          =   -1  'True
         TabIndex        =   10
         Top             =   360
         Width           =   1695
      End
      Begin VB.TextBox refno 
         BackColor       =   &H00FFFFFF&
         Height          =   345
         Index           =   1
         Left            =   1560
         Locked          =   -1  'True
         TabIndex        =   9
         Top             =   360
         Width           =   1695
      End
      Begin VB.Label Label11 
         BackColor       =   &H00C0FFC0&
         BackStyle       =   0  'Transparent
         Caption         =   "Refining Date"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3600
         TabIndex        =   19
         Top             =   360
         Width           =   1455
      End
      Begin VB.Label Label10 
         BackColor       =   &H00C0FFC0&
         BackStyle       =   0  'Transparent
         Caption         =   "Refining No"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   11.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   18
         Top             =   360
         Width           =   1215
      End
   End
   Begin VB.Image Image3 
      Height          =   585
      Left            =   8165
      Picture         =   "Oil Refining.frx":0000
      Top             =   6140
      Width           =   615
   End
   Begin VB.Image Image2 
      Height          =   915
      Left            =   -2210
      Picture         =   "Oil Refining.frx":1326
      Top             =   6720
      Width           =   10620
   End
   Begin VB.Label Label9 
      BackColor       =   &H80000013&
      Height          =   6255
      Left            =   8400
      TabIndex        =   36
      Top             =   0
      Width           =   375
   End
   Begin VB.Image Image1 
      Height          =   7560
      Left            =   8400
      Picture         =   "Oil Refining.frx":20D84
      Top             =   0
      Width           =   1980
   End
   Begin VB.Label Label8 
      BackColor       =   &H80000013&
      Caption         =   "Oil Refining"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   24
         Charset         =   0
         Weight          =   700
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   3000
      TabIndex        =   29
      Top             =   360
      Width           =   2775
   End
End
Attribute VB_Name = "form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim cnn As ADODB.Connection
Dim rs As New ADODB.Recordset
Dim rs1 As New ADODB.Recordset
Dim rs2 As New ADODB.Recordset
Dim rs3 As New ADODB.Recordset
Dim rs4 As New ADODB.Recordset
Dim rs5 As New ADODB.Recordset
Private Sub ckg_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = 8) Then
KeyAscii = 0
End If
End Sub

Private Sub ckg_KeyUp(KeyCode As Integer, Shift As Integer)
a = Val(ckg.Text) / 37.324
crudeoilmnused.Text = CStr(Round(a, 3))
End Sub

Private Sub Command2_Click()
Set Form19.callingform = Me
Form19.Show vbModal
End Sub

Private Sub Command3_Click()
reset
End Sub

Private Sub Command4_Click()

If ckg.Text = "" Then
MsgBox "Please enter the Kg of Crude Oil"
ckg.SetFocus
Exit Sub
End If
If cskg(0).Text = "" Then
MsgBox "Please enter the Kg of Castic Soda used"
cskg(0).SetFocus
Exit Sub
End If
If rkg.Text = "" Then
MsgBox "Please enter the Kg of Refining oil produced"
rkg.SetFocus
Exit Sub
End If
If dkg.Text = "" Then
MsgBox "Please enter the Kg of dirt oil produced"
dkg.SetFocus
Exit Sub
End If
If rshortage.Text < 0 Then
MsgBox "Please enter the Correct Values"
Exit Sub
End If
'////////////////////////////////////////
If rs.State = adStateOpen Then rs.Close
rs.Open " select RefNo from OilRefining where RefNo='" & Val(refno(1).Text) & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount > 0 Then
MsgBox " This record already exists"
reset
Exit Sub
Else

'////////////////////////////////////////////////////
If MsgBox("Are you sure to save this record ?", vbconfirmation + vbYesNo, "Shahbaz Oil Mill Pvt(Ltd)") = vbYes Then
'////////////////////////////////////////////////////
'Stock Maintenance of Crude Oil Used
Set rs3 = New ADODB.Recordset

If rs3.State = adStateOpen Then rs3.Close
rs3.Open "Stock1", cnn, adOpenStatic, adLockReadOnly
If rs3.RecordCount = 0 Then
MsgBox "Crude Oil is not available for Production"
reset
Exit Sub
Else
Set rs2 = New ADODB.Recordset

If rs2.State = adStateOpen Then rs2.Close

rs2.Open "select * from Stock1 where Prod_Id=" & Val(co.Text), cnn, adOpenStatic, adLockReadOnly
If rs2.RecordCount = 0 Then
MsgBox "Crude Oil is not available for Production"

Exit Sub
End If
'///////////////////////////////
If rs1.State = adStateOpen Then rs1.Close
rs1.Open "select sum(Qty_In),sum(Qty_Out) from Stock1 where Prod_Id=" & Val(co.Text), cnn, adOpenDynamic, adLockOptimistic

qty1 = rs1.Fields(0) - rs1.Fields(1)
If qty1 < Val(crudeoilmnused.Text) Then
MsgBox "Required Crude Oil is not available,Remaining Stock(Mn)= " & qty1
reset
Exit Sub
End If
'//////////////////////
Set rs3 = New ADODB.Recordset
If rs3.State = adStateOpen Then rs3.Close
rs3.Open "Stock1", cnn, adOpenStatic, adLockReadOnly
If rs3.RecordCount = 0 Then
MsgBox "Castic Soda is not available for Production"

⌨️ 快捷键说明

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