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

📄 product dep rep.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 Form11 
   BackColor       =   &H80000013&
   Caption         =   "Pdoduct Departure Report "
   ClientHeight    =   7065
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   9285
   LinkTopic       =   "Form11"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7065
   ScaleWidth      =   9285
   StartUpPosition =   1  'CenterOwner
   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            =   2280
      Style           =   1  'Graphical
      TabIndex        =   16
      Top             =   5760
      Width           =   1575
   End
   Begin VB.Frame Frame4 
      BackColor       =   &H80000013&
      Height          =   735
      Left            =   2040
      TabIndex        =   13
      Top             =   5520
      Width           =   3615
      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        =   14
         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            =   600
      TabIndex        =   12
      Top             =   4680
      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            =   600
      TabIndex        =   11
      Top             =   3720
      Width           =   1455
   End
   Begin VB.OptionButton Option2 
      BackColor       =   &H80000013&
      Caption         =   "All Days"
      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            =   600
      TabIndex        =   10
      Top             =   2760
      Width           =   1455
   End
   Begin VB.Frame Frame5 
      BackColor       =   &H80000013&
      Height          =   1215
      Left            =   360
      TabIndex        =   7
      Top             =   1200
      Width           =   6975
      Begin VB.ComboBox productname 
         Height          =   315
         ItemData        =   "Product Dep Rep.frx":0000
         Left            =   2160
         List            =   "Product Dep Rep.frx":0010
         TabIndex        =   15
         Top             =   480
         Width           =   1455
      End
      Begin VB.Label Label3 
         BackColor       =   &H80000013&
         Caption         =   "Product Name"
         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             =   480
         Width           =   1695
      End
   End
   Begin VB.Frame Frame3 
      BackColor       =   &H80000013&
      Height          =   855
      Left            =   360
      TabIndex        =   6
      Top             =   2520
      Width           =   6975
   End
   Begin VB.Frame Frame2 
      BackColor       =   &H80000013&
      Height          =   975
      Left            =   360
      TabIndex        =   2
      Top             =   4320
      Width           =   6975
      Begin MSComCtl2.DTPicker tdate 
         Height          =   375
         Left            =   4560
         TabIndex        =   3
         Top             =   360
         Width           =   1455
         _ExtentX        =   2566
         _ExtentY        =   661
         _Version        =   393216
         Format          =   64290817
         CurrentDate     =   38283
      End
      Begin MSComCtl2.DTPicker fdate 
         Height          =   375
         Left            =   1800
         TabIndex        =   4
         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            =   3600
         TabIndex        =   5
         Top             =   360
         Width           =   735
      End
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H80000013&
      Height          =   855
      Left            =   360
      TabIndex        =   0
      Top             =   3480
      Width           =   6975
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   375
         Left            =   1800
         TabIndex        =   1
         Top             =   240
         Width           =   1455
         _ExtentX        =   2566
         _ExtentY        =   661
         _Version        =   393216
         Format          =   64290817
         CurrentDate     =   38283
      End
   End
   Begin VB.Image Image3 
      Height          =   645
      Left            =   7510
      Picture         =   "Product Dep Rep.frx":0040
      Top             =   5800
      Width           =   555
   End
   Begin VB.Label Label4 
      BackColor       =   &H80000013&
      Height          =   5895
      Left            =   7600
      TabIndex        =   17
      Top             =   0
      Width           =   375
   End
   Begin VB.Image Image2 
      Height          =   855
      Left            =   -1070
      Picture         =   "Product Dep Rep.frx":1352
      Top             =   6400
      Width           =   8775
   End
   Begin VB.Image Image1 
      Height          =   7200
      Left            =   7690
      Picture         =   "Product Dep Rep.frx":19A90
      Top             =   0
      Width           =   1620
   End
   Begin VB.Label Label2 
      BackColor       =   &H80000013&
      Caption         =   "Product Departure Report"
      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            =   1080
      TabIndex        =   9
      Top             =   360
      Width           =   5655
   End
End
Attribute VB_Name = "Form11"
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 b_Change()

End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
Set Form7.callingform = Me
Form7.Show vbModal
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
'fdate.Value = Now
'tdate.Value = Now
End Sub



Private Sub Command1_Click()
If ProductName.Text = "" Then
MsgBox "Please Enter the Product Name"
Exit Sub
End If
'///////////////
If Option1.Value = False And Option2.Value = False And Option3.Value = False Then
MsgBox "First Select the All days or One day or From day To day Option"
Exit Sub
End If

If Option2.Value = True Then
If rs.State = adStateOpen Then rs.Close
'/////////////////////
rs.Open "SELECT Departure_Table.Dep_Id,Departure_Table.Veh_Name,Departure_Table.Veh_No,Departure_Table.Dep_Date,Departure_Table.Dep_Time,Departure_Table.S_Supply_Order,Sale_Supply_Order_Table.Cust_Id,Sale_Supply_Order_Detail_Table.Product_Name,Customer_Table.Cust_Name, Departure_Table.TBags,Departure_Table.[W/Bag],Departure_Table.Total_Mn,Departure_Table.Bilty_No, Departure_Table.Comp_Name ,Departure_Table.Driver_Name,Sale_Supply_Order_Detail_Table.Total_Mounds FROM Customer_Table INNER JOIN Sale_Supply_Order_Table ON Customer_Table.Cust_Id =Sale_Supply_Order_Table.Cust_Id INNER JOIN Departure_Table ON Sale_Supply_Order_Table.S_Supply_Order = Departure_Table.S_Supply_Order INNER JOIN Sale_Supply_Order_Detail_Table ON dbo.Sale_Supply_Order_Table.S_Supply_Order =Sale_Supply_Order_Detail_Table.S_Supply_Order where Sale_Supply_Order_Detail_Table.Product_Name='" & Trim(ProductName.Text) & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "This Product has not Departure so for"
Else
'////////////////////////////
Set Form16.report = New CrystalReport15
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 Departure_Table.Dep_Id,Departure_Table.Veh_Name,Departure_Table.Veh_No,Departure_Table.Dep_Date,Departure_Table.Dep_Time,Departure_Table.S_Supply_Order,Sale_Supply_Order_Table.Cust_Id,Sale_Supply_Order_Detail_Table.Product_Name,Customer_Table.Cust_Name, Departure_Table.TBags,Departure_Table.[W/Bag],Departure_Table.Total_Mn,Departure_Table.Bilty_No, Departure_Table.Comp_Name ,Departure_Table.Driver_Name,Sale_Supply_Order_Detail_Table.Total_Mounds FROM Customer_Table INNER JOIN Sale_Supply_Order_Table ON Customer_Table.Cust_Id =Sale_Supply_Order_Table.Cust_Id INNER JOIN Departure_Table ON Sale_Supply_Order_Table.S_Supply_Order = Departure_Table.S_Supply_Order INNER JOIN Sale_Supply_Order_Detail_Table ON dbo.Sale_Supply_Order_Table.S_Supply_Order =Sale_Supply_Order_Detail_Table.S_Supply_Order where Sale_Supply_Order_Detail_Table.Product_Name='" & Trim(ProductName.Text) & "' and Departure_Table.Dep_Date='" & DTPicker1.Value & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "This Product is not Departure on this date"
Else
'//////////////////////
Set Form16.report = New CrystalReport15
Form16.report.Database.SetDataSource rs, 3, 1
Form16.Show
End If
End If
If Option3.Value = True Then

If fdate.Value > tdate.Value Then
MsgBox "From Day should be less than the To Day"
Else
If rs.State = adStateOpen Then rs.Close
'//////////////////
rs.Open "SELECT Departure_Table.Dep_Id,Departure_Table.Veh_Name,Departure_Table.Veh_No,Departure_Table.Dep_Date,Departure_Table.Dep_Time,Departure_Table.S_Supply_Order,Sale_Supply_Order_Table.Cust_Id,Sale_Supply_Order_Detail_Table.Product_Name,Customer_Table.Cust_Name, Departure_Table.TBags,Departure_Table.[W/Bag],Departure_Table.Total_Mn,Departure_Table.Bilty_No, Departure_Table.Comp_Name ," _
        + "Departure_Table.Driver_Name,Sale_Supply_Order_Detail_Table.Total_Mounds FROM Customer_Table INNER JOIN Sale_Supply_Order_Table ON Customer_Table.Cust_Id =Sale_Supply_Order_Table.Cust_Id INNER JOIN Departure_Table ON Sale_Supply_Order_Table.S_Supply_Order = Departure_Table.S_Supply_Order INNER JOIN Sale_Supply_Order_Detail_Table ON dbo.Sale_Supply_Order_Table.S_Supply_Order =Sale_Supply_Order_Detail_Table.S_Supply_Order where Sale_Supply_Order_Detail_Table.Product_Name='" & Trim(ProductName.Text) & "' and Departure_Table.Dep_Date>='" & fdate.Value & "' and Departure_Table.Dep_Date<='" & tdate.Value & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "This Product is not Departure between these dates"
Else
'/////////////////////
Set Form16.report = New CrystalReport15
Form16.report.Database.SetDataSource rs, 3, 1
Form16.Show
End If
End If
End If
End Sub



⌨️ 快捷键说明

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