📄 rep oil dirt sale register.frm
字号:
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 = 5
Top = 240
Width = 735
End
End
Begin VB.Frame Frame1
BackColor = &H80000013&
Height = 855
Left = 600
TabIndex = 0
Top = 3360
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 = 7730
Picture = "Rep Oil dirt sale register.frx":0000
Top = 5640
Width = 555
End
Begin VB.Label Label5
BackColor = &H80000013&
Height = 5775
Left = 7810
TabIndex = 22
Top = 0
Width = 375
End
Begin VB.Image Image2
Height = 855
Left = -840
Picture = "Rep Oil dirt sale register.frx":1312
Top = 6240
Width = 8775
End
Begin VB.Image Image1
Height = 7020
Left = 7900
Picture = "Rep Oil dirt sale register.frx":19A50
Top = 0
Width = 1620
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "Dirt Oil Sale Register"
BeginProperty Font
Name = "Times New Roman"
Size = 21.75
Charset = 0
Weight = 700
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1800
TabIndex = 7
Top = 360
Width = 4215
End
End
Attribute VB_Name = "Form32"
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
Public Sub ad()
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 Sale_Supply_Order_Table.S_Supply_Order, Sale_Supply_Order_Table.S_Supply_Date,Sale_Supply_Order_Table.S_Receive_Order,Sale_Supply_Order_Detail_Table.Total_Bags,Sale_Supply_Order_Detail_Table.[W/Bag],Sale_Supply_Order_Detail_Table.Total_Mounds,Sale_Supply_Order_Detail_Table.[Rate/Mound],Sale_Supply_Order_Table.Grand_Amount,Sale_Supply_Order_Detail_Table.Labour_Exp,Sale_Supply_Order_Detail_Table.Packing_Exp,Sale_Supply_Order_Detail_Table.Sales_Tax,Sale_Supply_Order_Detail_Table.Other_Exp,Sale_Supply_Order_Table.Net_Amount,Sale_Supply_Order_Table.Cust_Id ,Sale_Supply_Order_Detail_Table.Product_Name FROM Sale_Supply_Order_Table INNER JOIN Sale_Supply_Order_Detail_Table ON Sale_Supply_Order_Table.S_Supply_Order =Sale_Supply_Order_Detail_Table.S_Supply_Order where Sale_Supply_Order_Detail_Table.Product_Name='" & Trim("Dirt Oil") & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Dirt Oil is not Saled so for"
Else
'////////////////////////////
Set Form16.report = New CrystalReport7
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 Sale_Supply_Order_Table.S_Supply_Order, Sale_Supply_Order_Table.S_Supply_Date,Sale_Supply_Order_Table.S_Receive_Order,Sale_Supply_Order_Detail_Table.Total_Bags,Sale_Supply_Order_Detail_Table.[W/Bag],Sale_Supply_Order_Detail_Table.Total_Mounds,Sale_Supply_Order_Detail_Table.[Rate/Mound],Sale_Supply_Order_Table.Grand_Amount,Sale_Supply_Order_Detail_Table.Labour_Exp,Sale_Supply_Order_Detail_Table.Packing_Exp,Sale_Supply_Order_Detail_Table.Sales_Tax,Sale_Supply_Order_Detail_Table.Other_Exp,Sale_Supply_Order_Table.Net_Amount,Sale_Supply_Order_Table.Cust_Id ,Sale_Supply_Order_Detail_Table.Product_Name FROM Sale_Supply_Order_Table INNER JOIN Sale_Supply_Order_Detail_Table ON Sale_Supply_Order_Table.S_Supply_Order =Sale_Supply_Order_Detail_Table.S_Supply_Order where Sale_Supply_Order_Detail_Table.Product_Name='" & Trim("Dirt Oil") & "' and Sale_Supply_Order_Table.S_Supply_Date='" & DTPicker1.Value & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Dirt Oil is not Saled on this date"
Else
'//////////////////////
Set Form16.report = New CrystalReport7
Form16.report.Database.SetDataSource rs, 3, 1
Form16.Show
End If
End If
If Option3.Value = True Then
If c.Value > d.Value Then
MsgBox "From Day should be less than the To Day"
Else
If rs.State = adStateOpen Then rs.Close
'//////////////////
rs.Open "SELECT Sale_Supply_Order_Table.S_Supply_Order,Sale_Supply_Order_Table.S_Supply_Date,Sale_Supply_Order_Table.S_Receive_Order,Sale_Supply_Order_Detail_Table.Total_Bags,Sale_Supply_Order_Detail_Table.[W/Bag],Sale_Supply_Order_Detail_Table.Total_Mounds,Sale_Supply_Order_Detail_Table.[Rate/Mound],Sale_Supply_Order_Table.Grand_Amount,Sale_Supply_Order_Detail_Table.Labour_Exp,Sale_Supply_Order_Detail_Table.Packing_Exp,Sale_Supply_Order_Detail_Table.Sales_Tax,Sale_Supply_Order_Detail_Table.Other_Exp,Sale_Supply_Order_Table.Net_Amount,Sale_Supply_Order_Table.Cust_Id,Sale_Supply_Order_Detail_Table.Product_Name FROM Sale_Supply_Order_Table INNER JOIN Sale_Supply_Order_Detail_Table ON Sale_Supply_Order_Table.S_Supply_Order =Sale_Supply_Order_Detail_Table.S_Supply_Order where Sale_Supply_Order_Detail_Table.Product_Name='" & Trim("Dirt Oil") & "'and Sale_Supply_Order_Table.S_Supply_Date>='" & c.Value & "' and Sale_Supply_Order_Table.S_Supply_Date<='" & d.Value & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Dirt Oil is not Saled between these dates"
Else
'/////////////////////
Set Form16.report = New CrystalReport7
Form16.report.Database.SetDataSource rs, 3, 1
Form16.Show
End If
End If
End If
End Sub
Private Sub Command1_Click()
If Option4.Value = False And Option5.Value = False Then
MsgBox "First Select the All Customer or Single customer Record Button"
End If
If Option5.Value = True Then
ad
End If
If Option4.Value = True Then
ad1
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
Set Form21.callingform = Me
Form21.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"
a.Visible = False
b.Visible = False
Label3.Visible = False
Label4.Visible = False
Command3.Visible = False
'DTPicker1.Value = Now
'c.Value = Now
'd.Value = Now
End Sub
Private Sub Option4_Click()
Command3.Visible = True
a.Visible = True
b.Visible = True
Label3.Visible = True
Label4.Visible = True
End Sub
Private Sub Option5_Click()
If Command3.Visible = True And a.Visible = True And b.Visible = True And Label3.Visible = True And Label4.Visible = True Then
Command3.Visible = False
a.Visible = False
b.Visible = False
Label3.Visible = False
Label4.Visible = False
End If
End Sub
Public Sub ad1()
'///////////////
If b.Text = "" Then
MsgBox "Please Enter the Customer Code and 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 Sale_Supply_Order_Table.S_Supply_Order, Sale_Supply_Order_Table.S_Supply_Date,Sale_Supply_Order_Table.S_Receive_Order,Sale_Supply_Order_Detail_Table.Total_Bags,Sale_Supply_Order_Detail_Table.[W/Bag],Sale_Supply_Order_Detail_Table.Total_Mounds,Sale_Supply_Order_Detail_Table.[Rate/Mound],Sale_Supply_Order_Table.Grand_Amount,Sale_Supply_Order_Detail_Table.Labour_Exp,Sale_Supply_Order_Detail_Table.Packing_Exp,Sale_Supply_Order_Detail_Table.Sales_Tax,Sale_Supply_Order_Detail_Table.Other_Exp,Sale_Supply_Order_Table.Net_Amount,Sale_Supply_Order_Table.Cust_Id ,Sale_Supply_Order_Detail_Table.Product_Name FROM Sale_Supply_Order_Table INNER JOIN Sale_Supply_Order_Detail_Table ON Sale_Supply_Order_Table.S_Supply_Order =Sale_Supply_Order_Detail_Table.S_Supply_Order where Sale_Supply_Order_Detail_Table.Product_Name='" & Trim("Dirt Oil") & "'and Cust_Id='" & (b.Text) & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Dirt Oil is not Saled so for"
Else
'////////////////////////////
Set Form16.report = New CrystalReport7
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 Sale_Supply_Order_Table.S_Supply_Order, Sale_Supply_Order_Table.S_Supply_Date,Sale_Supply_Order_Table.S_Receive_Order,Sale_Supply_Order_Detail_Table.Total_Bags,Sale_Supply_Order_Detail_Table.[W/Bag],Sale_Supply_Order_Detail_Table.Total_Mounds,Sale_Supply_Order_Detail_Table.[Rate/Mound],Sale_Supply_Order_Table.Grand_Amount,Sale_Supply_Order_Detail_Table.Labour_Exp,Sale_Supply_Order_Detail_Table.Packing_Exp,Sale_Supply_Order_Detail_Table.Sales_Tax,Sale_Supply_Order_Detail_Table.Other_Exp,Sale_Supply_Order_Table.Net_Amount,Sale_Supply_Order_Table.Cust_Id ,Sale_Supply_Order_Detail_Table.Product_Name FROM Sale_Supply_Order_Table INNER JOIN Sale_Supply_Order_Detail_Table ON Sale_Supply_Order_Table.S_Supply_Order =Sale_Supply_Order_Detail_Table.S_Supply_Order where Sale_Supply_Order_Detail_Table.Product_Name='" & Trim("Dirt Oil") & "' and Sale_Supply_Order_Table.S_Supply_Date='" & DTPicker1.Value & "'and Cust_Id='" & (b.Text) & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Dirt Oil is not Saled on this date"
Else
'//////////////////////
Set Form16.report = New CrystalReport7
Form16.report.Database.SetDataSource rs, 3, 1
Form16.Show
End If
End If
If Option3.Value = True Then
If c.Value > d.Value Then
MsgBox "From Day should be less than the To Day"
Else
If rs.State = adStateOpen Then rs.Close
'//////////////////
str1 = "and Cust_Id='" & (b.Text) & "'"
rs.Open "SELECT Sale_Supply_Order_Table.S_Supply_Order,Sale_Supply_Order_Table.S_Supply_Date,Sale_Supply_Order_Table.S_Receive_Order,Sale_Supply_Order_Detail_Table.Total_Bags,Sale_Supply_Order_Detail_Table.[W/Bag],Sale_Supply_Order_Detail_Table.Total_Mounds,Sale_Supply_Order_Detail_Table.[Rate/Mound],Sale_Supply_Order_Table.Grand_Amount,Sale_Supply_Order_Detail_Table.Labour_Exp,Sale_Supply_Order_Detail_Table.Packing_Exp,Sale_Supply_Order_Detail_Table.Sales_Tax,Sale_Supply_Order_Detail_Table.Other_Exp,Sale_Supply_Order_Table.Net_Amount,Sale_Supply_Order_Table.Cust_Id,Sale_Supply_Order_Detail_Table.Product_Name FROM Sale_Supply_Order_Table INNER JOIN Sale_Supply_Order_Detail_Table ON Sale_Supply_Order_Table.S_Supply_Order =Sale_Supply_Order_Detail_Table.S_Supply_Order where Sale_Supply_Order_Detail_Table.Product_Name='" & Trim("Dirt Oil") & "'and Sale_Supply_Order_Table.S_Supply_Date>='" & c.Value & "' and Sale_Supply_Order_Table.S_Supply_Date<='" & d.Value & "'+ str1 ", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Dirt Oil is not Saled between these dates"
Else
'/////////////////////
Set Form16.report = New CrystalReport7
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 + -