📄 rep oil rfining register.frm
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Form24
BackColor = &H80000013&
Caption = "Oil Refining Register Report"
ClientHeight = 6060
ClientLeft = 60
ClientTop = 450
ClientWidth = 7755
LinkTopic = "Form24"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6060
ScaleWidth = 7755
StartUpPosition = 1 'CenterOwner
Begin VB.Frame Frame4
BackColor = &H80000013&
Height = 735
Left = 1320
TabIndex = 11
Top = 4440
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 = 600
TabIndex = 10
Top = 3360
Width = 1335
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 = 9
Top = 2400
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 = 255
Left = 600
TabIndex = 8
Top = 1560
Width = 1815
End
Begin VB.Frame Frame3
BackColor = &H80000013&
Height = 855
Left = 360
TabIndex = 6
Top = 1200
Width = 5775
End
Begin VB.Frame Frame2
BackColor = &H80000013&
Height = 855
Left = 360
TabIndex = 2
Top = 3120
Width = 5775
Begin MSComCtl2.DTPicker DTPicker3
Height = 375
Left = 4200
TabIndex = 3
Top = 240
Width = 1455
_ExtentX = 2566
_ExtentY = 661
_Version = 393216
Format = 19529729
CurrentDate = 38283
End
Begin MSComCtl2.DTPicker DTPicker2
Height = 375
Left = 1680
TabIndex = 4
Top = 240
Width = 1455
_ExtentX = 2566
_ExtentY = 661
_Version = 393216
Format = 19529729
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 = 5
Top = 360
Width = 735
End
End
Begin VB.Frame Frame1
BackColor = &H80000013&
Height = 855
Left = 360
TabIndex = 0
Top = 2160
Width = 5775
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 1680
TabIndex = 1
Top = 240
Width = 1455
_ExtentX = 2566
_ExtentY = 661
_Version = 393216
Format = 19529729
CurrentDate = 38283
End
End
Begin VB.Image Image3
Height = 675
Left = 6080
Picture = "Rep Oil Rfining Register.frx":0000
Top = 4880
Width = 690
End
Begin VB.Label Label3
BackColor = &H80000013&
Height = 5055
Left = 6360
TabIndex = 14
Top = 0
Width = 255
End
Begin VB.Image Image2
Height = 765
Left = -590
Picture = "Rep Oil Rfining Register.frx":18DE
Top = 5430
Width = 6960
End
Begin VB.Image Image1
Height = 6120
Left = 6360
Picture = "Rep Oil Rfining Register.frx":12E70
Top = 0
Width = 1440
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "Oil Refining Register"
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 = 1200
TabIndex = 7
Top = 360
Width = 3855
End
End
Attribute VB_Name = "Form24"
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 * from OilRefining ", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Oil is not Refined so for"
Else
Set Form16.report = New CrystalReport2
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 * from OilRefining where RefDate='" & DTPicker1.Value & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Oil is not Refined on this date"
Else
Set Form16.report = New CrystalReport2
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 * from OilRefining where RefDate>='" & DTPicker2.Value & "' and RefDate<='" & DTPicker3.Value & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Oil is not Refined between these dates"
Else
Set Form16.report = New CrystalReport2
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 + -