?? rep seed crushing register.frm
字號:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form Form17
BackColor = &H80000013&
Caption = "Seed Crushing Register"
ClientHeight = 6060
ClientLeft = 60
ClientTop = 450
ClientWidth = 7530
LinkTopic = "Form17"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6060
ScaleWidth = 7530
StartUpPosition = 1 'CenterOwner
Begin VB.OptionButton Option3
BackColor = &H80000013&
Caption = "From Day"
BeginProperty Font
Name = "Times New Roman"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
TabIndex = 13
Top = 3480
Width = 1095
End
Begin VB.OptionButton Option1
BackColor = &H80000013&
Caption = "One Day"
BeginProperty Font
Name = "Times New Roman"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
TabIndex = 12
Top = 2520
Width = 1095
End
Begin VB.OptionButton Option2
BackColor = &H80000013&
Caption = "All Dates"
BeginProperty Font
Name = "Times New Roman"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 480
TabIndex = 11
Top = 1440
Width = 1815
End
Begin VB.Frame Frame4
BackColor = &H80000013&
Height = 735
Left = 1080
TabIndex = 8
Top = 4440
Width = 3735
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 = 10
Top = 240
Width = 1575
End
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 = 9
Top = 240
Width = 1575
End
End
Begin VB.Frame Frame1
BackColor = &H80000013&
Height = 855
Left = 360
TabIndex = 4
Top = 2160
Width = 5535
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 1440
TabIndex = 5
Top = 240
Width = 1455
_ExtentX = 2566
_ExtentY = 661
_Version = 393216
Format = 64290817
CurrentDate = 38283
End
End
Begin VB.Frame Frame2
BackColor = &H80000013&
Height = 855
Left = 360
TabIndex = 1
Top = 3240
Width = 5535
Begin MSComCtl2.DTPicker DTPicker3
Height = 375
Left = 3960
TabIndex = 2
Top = 240
Width = 1455
_ExtentX = 2566
_ExtentY = 661
_Version = 393216
Format = 64290817
CurrentDate = 38283
End
Begin MSComCtl2.DTPicker DTPicker2
Height = 375
Left = 1440
TabIndex = 3
Top = 240
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 = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3120
TabIndex = 7
Top = 360
Width = 735
End
End
Begin VB.Frame Frame3
BackColor = &H80000013&
Height = 855
Left = 360
TabIndex = 0
Top = 1080
Width = 5535
End
Begin VB.Image Image3
Height = 675
Left = 5830
Picture = "Rep Seed Crushing Register.frx":0000
Top = 4870
Width = 690
End
Begin VB.Label Label3
BackColor = &H80000013&
Height = 5055
Left = 6120
TabIndex = 14
Top = 0
Width = 255
End
Begin VB.Image Image2
Height = 765
Left = -830
Picture = "Rep Seed Crushing Register.frx":18DE
Top = 5430
Width = 6960
End
Begin VB.Image Image1
Height = 6120
Left = 6120
Picture = "Rep Seed Crushing Register.frx":12E70
Top = 0
Width = 1440
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "Seed Crushing 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 = 840
TabIndex = 6
Top = 360
Width = 4455
End
End
Attribute VB_Name = "Form17"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
If Option2.Value = True Then
If rs.State = adStateOpen Then rs.Close
rs.Open "SELECT * from SeedCrtshing ", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Seed is not Crushed so for"
Else
Set Form16.report = New CrystalReport1
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 SeedCrtshing where CrDate='" & DTPicker1.Value & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Seed is not Crushed on this date"
Else
Set Form16.report = New CrystalReport1
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 SeedCrtshing where CrDate>='" & DTPicker2.Value & "' and CrDate<='" & DTPicker3.Value & "'", cnn, adOpenStatic, adLockReadOnly
If rs.RecordCount = 0 Then
MsgBox "Seed is not Crushed between these dates"
Else
Set Form16.report = New CrystalReport1
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
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -