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

📄 rep oil cake sale avg.frm

📁 This project is to design the automated system for the inventory of Al-Ahmad Cotton and Oil Mills si
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Form36 
   BackColor       =   &H80000013&
   Caption         =   "Oil Cake Sale Average Report"
   ClientHeight    =   6000
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   7635
   LinkTopic       =   "Form36"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6000
   ScaleWidth      =   7635
   StartUpPosition =   3  'Windows Default
   Begin VB.Frame Frame4 
      BackColor       =   &H80000013&
      Height          =   735
      Left            =   1200
      TabIndex        =   11
      Top             =   4320
      Width           =   3735
      Begin VB.CommandButton Command2 
         Appearance      =   0  'Flat
         BackColor       =   &H00FFFFFF&
         Caption         =   "Cancel"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   1800
         Style           =   1  'Graphical
         TabIndex        =   13
         Top             =   240
         Width           =   1575
      End
      Begin VB.CommandButton Command1 
         Appearance      =   0  'Flat
         BackColor       =   &H00FFFFFF&
         Caption         =   "Preview"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   240
         Style           =   1  'Graphical
         TabIndex        =   12
         Top             =   240
         Width           =   1575
      End
   End
   Begin VB.OptionButton Option3 
      BackColor       =   &H80000013&
      Caption         =   "From Day"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   11.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   10
      Top             =   3360
      Width           =   1455
   End
   Begin VB.OptionButton Option1 
      BackColor       =   &H80000013&
      Caption         =   "One Day"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   11.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   9
      Top             =   2280
      Width           =   1335
   End
   Begin VB.OptionButton Option2 
      BackColor       =   &H80000013&
      Caption         =   "All Dates"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   11.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   8
      Top             =   1320
      Width           =   1815
   End
   Begin VB.Frame Frame2 
      BackColor       =   &H80000013&
      Height          =   975
      Left            =   240
      TabIndex        =   4
      Top             =   960
      Width           =   5895
   End
   Begin VB.Frame Frame3 
      BackColor       =   &H80000013&
      Height          =   1095
      Left            =   240
      TabIndex        =   2
      Top             =   3000
      Width           =   5895
      Begin MSComCtl2.DTPicker DTPicker3 
         Height          =   375
         Left            =   4320
         TabIndex        =   5
         Top             =   360
         Width           =   1455
         _ExtentX        =   2566
         _ExtentY        =   661
         _Version        =   393216
         Format          =   64290817
         CurrentDate     =   38283
      End
      Begin MSComCtl2.DTPicker DTPicker2 
         Height          =   375
         Left            =   1680
         TabIndex        =   6
         Top             =   360
         Width           =   1455
         _ExtentX        =   2566
         _ExtentY        =   661
         _Version        =   393216
         Format          =   64290817
         CurrentDate     =   38283
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "To Day"
         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            =   3360
         TabIndex        =   7
         Top             =   360
         Width           =   735
      End
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H80000013&
      Height          =   855
      Left            =   240
      TabIndex        =   0
      Top             =   2040
      Width           =   5895
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   375
         Left            =   1680
         TabIndex        =   1
         Top             =   240
         Width           =   1455
         _ExtentX        =   2566
         _ExtentY        =   661
         _Version        =   393216
         Format          =   64290817
         CurrentDate     =   38283
      End
   End
   Begin VB.Image Image3 
      Height          =   675
      Left            =   5965
      Picture         =   "Rep Oil Cake Sale Avg.frx":0000
      Top             =   4870
      Width           =   690
   End
   Begin VB.Label Label3 
      BackColor       =   &H80000013&
      Height          =   5055
      Left            =   6120
      TabIndex        =   14
      Top             =   0
      Width           =   375
   End
   Begin VB.Image Image2 
      Height          =   765
      Left            =   -710
      Picture         =   "Rep Oil Cake Sale Avg.frx":18DE
      Top             =   5430
      Width           =   6960
   End
   Begin VB.Image Image1 
      Height          =   6120
      Left            =   6240
      Picture         =   "Rep Oil Cake Sale Avg.frx":12E70
      Top             =   0
      Width           =   1440
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "Oil Cake Sale Average"
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   20.25
         Charset         =   0
         Weight          =   700
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   840
      TabIndex        =   3
      Top             =   240
      Width           =   4095
   End
End
Attribute VB_Name = "Form36"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As New ADODB.Recordset
'Public callingform As Object
Private Sub Command1_Click()
If Option2.Value = True Then
If rs.State = adStateOpen Then rs.Close
'/////////////////////
'rs.Open "SELECT dbo.Sale_Supply_Order_Table.S_Supply_Order, dbo.Sale_Supply_Order_Table.S_Supply_Date, dbo.Sale_Supply_Order_Detail_Table.Total_Bags, dbo.Sale_Supply_Order_Detail_Table.Product_Name, dbo.Sale_Supply_Order_Detail_Table.Total_Mounds, dbo.Sale_Supply_Order_Detail_Table.[Rate/Mound] , dbo.Sale_Supply_Order_Table.Grand_Amount FROM dbo.Sale_Supply_Order_Table INNER JOIN dbo.Sale_Supply_Order_Detail_Table ON dbo.Sale_Supply_Order_Table.S_Supply_Order = dbo.Sale_Supply_Order_Detail_Table.S_Supply_Order", cnn, adOpenStatic, adLockReadOnly
rs.Open "SELECT dbo.Sale_Supply_Order_Table.S_Supply_Order, dbo.Sale_Supply_Order_Table.S_Supply_Date, dbo.Sale_Supply_Order_Detail_Table.Total_Bags, dbo.Sale_Supply_Order_Detail_Table.Total_Mounds, dbo.Sale_Supply_Order_Detail_Table.[Rate/Mound],dbo.Sale_Supply_Order_Table.Grand_Amount FROM dbo.Sale_Supply_Order_Table INNER JOIN dbo.Sale_Supply_Order_Detail_Table ON dbo.Sale_Supply_Order_Table.S_Supply_Order = dbo.Sale_Supply_Order_Detail_Table.S_Supply_Order where Sale_Supply_Order_Detail_Table.Product_Name='" & Trim("Oil Cake") & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Oil Cake is not Saled so for"
Else
'////////////////////////////
Set Form16.report = New CrystalReport4
Form16.report.Database.SetDataSource rs, 3, 1
Form16.Show
End If
End If
If Option1.Value = True Then
If rs.State = adStateOpen Then rs.Close
'///////////////////
rs.Open "SELECT dbo.Sale_Supply_Order_Table.S_Supply_Order, dbo.Sale_Supply_Order_Table.S_Supply_Date, dbo.Sale_Supply_Order_Detail_Table.Total_Bags, dbo.Sale_Supply_Order_Detail_Table.Total_Mounds, dbo.Sale_Supply_Order_Detail_Table.[Rate/Mound],dbo.Sale_Supply_Order_Table.Grand_Amount FROM dbo.Sale_Supply_Order_Table INNER JOIN dbo.Sale_Supply_Order_Detail_Table ON dbo.Sale_Supply_Order_Table.S_Supply_Order = dbo.Sale_Supply_Order_Detail_Table.S_Supply_Order where Sale_Supply_Order_Detail_Table.Product_Name='" & Trim("Oil Cake") & "' and Sale_Supply_Order_Table.S_Supply_Date='" & DTPicker1.Value & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Oil Cake is not Saled on this date"
Else
'//////////////////////
Set Form16.report = New CrystalReport4
Form16.report.Database.SetDataSource rs, 3, 1
Form16.Show
End If
End If
If Option3.Value = True Then
If DTPicker2.Value > DTPicker3.Value Then
MsgBox "From Day should be less than the To Day"
Else
If rs.State = adStateOpen Then rs.Close
'//////////////////
rs.Open "SELECT dbo.Sale_Supply_Order_Table.S_Supply_Order, dbo.Sale_Supply_Order_Table.S_Supply_Date, dbo.Sale_Supply_Order_Detail_Table.Total_Bags, dbo.Sale_Supply_Order_Detail_Table.Total_Mounds, dbo.Sale_Supply_Order_Detail_Table.[Rate/Mound],dbo.Sale_Supply_Order_Table.Grand_Amount FROM dbo.Sale_Supply_Order_Table INNER JOIN dbo.Sale_Supply_Order_Detail_Table ON dbo.Sale_Supply_Order_Table.S_Supply_Order = dbo.Sale_Supply_Order_Detail_Table.S_Supply_Order where Sale_Supply_Order_Detail_Table.Product_Name='" & Trim("Oil Cake") & "' and Sale_Supply_Order_Table.S_Supply_Date>='" & DTPicker2.Value & "' and Sale_Supply_Order_Table.S_Supply_Date<='" & DTPicker3.Value & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Oil Cake is not Saled between these dates"
Else
'/////////////////////
Set Form16.report = New CrystalReport4
Form16.report.Database.SetDataSource rs, 3, 1
Form16.Show
End If
End If
End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
If cnn.State = adStateOpen Then cnn.Close
cnn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=hussain"
'DTPicker1.Value = Now
'DTPicker2.Value = Now
'DTPicker3.Value = Now

End Sub




⌨️ 快捷键说明

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