📄 rep sale dep.frm
字号:
TabIndex = 0
Top = 1200
Width = 7335
Begin VB.CommandButton Command3
Appearance = 0 'Flat
Caption = "......."
Height = 325
Left = 2640
Style = 1 'Graphical
TabIndex = 3
Top = 480
Width = 375
End
Begin VB.TextBox b
Appearance = 0 'Flat
Height = 315
Left = 1800
Locked = -1 'True
TabIndex = 2
Top = 480
Width = 855
End
Begin VB.TextBox a
Appearance = 0 'Flat
Height = 315
Left = 4800
Locked = -1 'True
TabIndex = 1
Top = 480
Width = 2415
End
Begin VB.Label Label4
BackColor = &H80000013&
Caption = "Customer 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 = 3120
TabIndex = 5
Top = 480
Width = 1695
End
Begin VB.Label Label3
BackColor = &H80000013&
Caption = "Customer Code"
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 = 120
TabIndex = 4
Top = 480
Width = 1575
End
End
Begin VB.Image Image3
Height = 645
Left = 7615
Picture = "Rep Sale Dep.frx":0000
Top = 5640
Width = 555
End
Begin VB.Label Label5
BackColor = &H80000013&
Height = 5895
Left = 7710
TabIndex = 21
Top = 0
Width = 375
End
Begin VB.Image Image2
Height = 825
Left = -840
Picture = "Rep Sale Dep.frx":1312
Top = 6240
Width = 8685
End
Begin VB.Image Image1
Height = 7020
Left = 7800
Picture = "Rep Sale Dep.frx":18928
Top = 0
Width = 1620
End
Begin VB.Label Label2
BackColor = &H80000013&
Caption = "Single Party Departure Report"
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 = 1080
TabIndex = 19
Top = 360
Width = 5895
End
End
Attribute VB_Name = "Form8"
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 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
'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 Command1_Click()
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 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 Departure_Table.S_Supply_Order='" & (invoice.Text) & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "No Departure is done so for"
Else
'////////////////////////////
Set Form16.report = New CrystalReport11
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.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 Departure_Table.S_Supply_Order='" & (invoice.Text) & "' and Departure_Table.Dep_Date='" & DTPicker1.Value & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "No Departure is done on this date"
Else
'//////////////////////
Set Form16.report = New CrystalReport11
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 Departure_Table.Dep_Id,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 Departure_Table.S_Supply_Order='" & (invoice.Text) & "' and Departure_Table.Dep_Date>='" & c.Value & "' and Departure_Table.Dep_Date<='" & d.Value & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "No Departure is done between these dates"
Else
'/////////////////////
Set Form16.report = New CrystalReport11
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 + -