?? frmsellall.frm
字號:
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc8
Height = 735
Left = -75000
Top = 5520
Visible = 0 'False
Width = 1455
_ExtentX = 2566
_ExtentY = 1296
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc8"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label2
Caption = "銷貨總金額:"
Height = 375
Left = -72600
TabIndex = 17
Top = 5760
Width = 1095
End
Begin VB.Label Label1
Caption = "銷貨總金額:"
Height = 255
Left = 2400
TabIndex = 16
Top = 5760
Width = 1215
End
Begin VB.Label Label3
Caption = "銷貨總金額:"
Height = 255
Left = -72600
TabIndex = 15
Top = 5760
Width = 1215
End
Begin VB.Label Label4
Caption = "銷貨總金額:"
Height = 255
Left = -72600
TabIndex = 14
Top = 5760
Width = 1095
End
End
End
Attribute VB_Name = "frmSellall"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim inty As Integer
Dim intm As Integer
Dim intd As Integer
Private Sub Command1_Click()
Adodc1.Recordset.MoveFirst
End Sub
Private Sub Command10_Click()
If Adodc2.Recordset.EOF = True Then
MsgBox "已是末記錄!", vbOKOnly + vbInformation, "注意"
Adodc2.Recordset.MoveLast
Else
Adodc2.Recordset.MoveNext
End If
End Sub
Private Sub Command11_Click()
If Adodc2.Recordset.BOF = True Then
MsgBox "已是首記錄!", vbOKOnly + vbInformation, "注意"
Adodc2.Recordset.MoveFirst
Else
Adodc2.Recordset.MovePrevious
End If
End Sub
Private Sub Command12_Click()
Adodc2.Recordset.MoveLast
End Sub
Private Sub Command13_Click()
Adodc6.Recordset.MoveFirst
End Sub
Private Sub Command14_Click()
If Adodc6.Recordset.EOF = True Then
MsgBox "已是末記錄!", vbOKOnly + vbInformation, "注意"
Adodc6.Recordset.MoveLast
Else
Adodc6.Recordset.MoveNext
End If
End Sub
Private Sub Command15_Click()
If Adodc6.Recordset.BOF = True Then
MsgBox "已是首記錄!", vbOKOnly + vbInformation, "注意"
Adodc6.Recordset.MoveFirst
Else
Adodc6.Recordset.MovePrevious
End If
End Sub
Private Sub Command16_Click()
Adodc6.Recordset.MoveLast
End Sub
Private Sub Command17_Click()
Adodc3.Recordset.MoveFirst
End Sub
Private Sub Command18_Click()
If Adodc3.Recordset.EOF = True Then
MsgBox "已是末記錄!", vbOKOnly + vbInformation, "注意"
Adodc3.Recordset.MoveLast
Else
Adodc3.Recordset.MoveNext
End If
End Sub
Private Sub Command19_Click()
If Adodc3.Recordset.BOF = True Then
MsgBox "已是首記錄!", vbOKOnly + vbInformation, "注意"
Adodc3.Recordset.MoveFirst
Else
Adodc3.Recordset.MovePrevious
End If
End Sub
Private Sub Command2_Click()
If Adodc1.Recordset.EOF = True Then
MsgBox "已是末記錄!", vbOKOnly + vbInformation, "注意"
Adodc1.Recordset.MoveLast
Else
Adodc1.Recordset.MoveNext
End If
End Sub
Private Sub Command20_Click()
Adodc3.Recordset.MoveLast
End Sub
Private Sub Command21_Click()
Adodc7.Recordset.MoveFirst
End Sub
Private Sub Command22_Click()
If Adodc7.Recordset.EOF = True Then
MsgBox "已是末記錄!", vbOKOnly + vbInformation, "注意"
Adodc7.Recordset.MoveLast
Else
Adodc7.Recordset.MoveNext
End If
End Sub
Private Sub Command23_Click()
If Adodc7.Recordset.BOF = True Then
MsgBox "已是首記錄!", vbOKOnly + vbInformation, "注意"
Adodc7.Recordset.MoveFirst
Else
Adodc7.Recordset.MovePrevious
End If
End Sub
Private Sub Command24_Click()
Adodc7.Recordset.MoveLast
End Sub
Private Sub Command25_Click()
Adodc4.Recordset.MoveFirst
End Sub
Private Sub Command26_Click()
If Adodc4.Recordset.EOF = True Then
MsgBox "已是末記錄!", vbOKOnly + vbInformation, "注意"
Adodc4.Recordset.MoveLast
Else
Adodc4.Recordset.MoveNext
End If
End Sub
Private Sub Command27_Click()
If Adodc4.Recordset.BOF = True Then
MsgBox "已是首記錄!", vbOKOnly + vbInformation, "注意"
Adodc4.Recordset.MoveFirst
Else
Adodc4.Recordset.MovePrevious
End If
End Sub
Private Sub Command28_Click()
Adodc4.Recordset.MoveLast
End Sub
Private Sub Command29_Click()
Adodc8.Recordset.MoveFirst
End Sub
Private Sub Command3_Click()
If Adodc1.Recordset.BOF = True Then
MsgBox "已是首記錄!", vbOKOnly + vbInformation, "注意"
Adodc1.Recordset.MoveFirst
Else
Adodc1.Recordset.MovePrevious
End If
End Sub
Private Sub Command30_Click()
If Adodc8.Recordset.EOF = True Then
MsgBox "已是末記錄!", vbOKOnly + vbInformation, "注意"
Adodc8.Recordset.MoveLast
Else
Adodc8.Recordset.MoveNext
End If
End Sub
Private Sub Command31_Click()
If Adodc8.Recordset.BOF = True Then
MsgBox "已是首記錄!", vbOKOnly + vbInformation, "注意"
Adodc8.Recordset.MoveFirst
Else
Adodc8.Recordset.MovePrevious
End If
End Sub
Private Sub Command32_Click()
Adodc8.Recordset.MoveLast
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.MoveLast
End Sub
Private Sub Command5_Click()
Adodc5.Recordset.MoveFirst
End Sub
Private Sub Command6_Click()
If Adodc5.Recordset.EOF = True Then
MsgBox "已是末記錄!", vbOKOnly + vbInformation, "注意"
Adodc5.Recordset.MoveLast
Else
Adodc5.Recordset.MoveNext
End If
End Sub
Private Sub Command7_Click()
If Adodc5.Recordset.BOF = True Then
MsgBox "已是首記錄!", vbOKOnly + vbInformation, "注意"
Adodc5.Recordset.MoveFirst
Else
Adodc5.Recordset.MovePrevious
End If
End Sub
Private Sub Command8_Click()
Adodc5.Recordset.MoveLast
End Sub
Private Sub Command9_Click()
Adodc2.Recordset.MoveFirst
End Sub
Private Sub Form_Load()
inty = Year(Date)
intm = Month(Date)
intd = Day(Date)
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Dim str As String
str = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\sellsystem.mdb;"
Adodc1.ConnectionString = str
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = "select * from sell where 銷售年=" & inty & " and 銷售月=" & intm & " and 銷售日=" & intd & " "
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Refresh
Adodc2.ConnectionString = str
Adodc2.CommandType = adCmdText
Adodc2.RecordSource = "select * from sell where 銷售年=" & inty & " and 銷售月=" & intm & ""
Adodc2.Refresh
Set DataGrid2.DataSource = Adodc2
DataGrid2.Refresh
Select Case intm
Case Is < 4
intm = 3
Case Is < 7
intm = 6
Case Is < 10
intm = 9
Case Is > 10
intm = 12
End Select
Adodc3.ConnectionString = str
Adodc3.CommandType = adCmdText
Adodc3.RecordSource = "select * from sell where 銷售年=" & inty & " and 銷售月 between " & (intm - 2) & " and " & intm & " "
Adodc3.Refresh
Set DataGrid3.DataSource = Adodc3
DataGrid3.Refresh
intm = Month(Date)
Adodc4.ConnectionString = str
Adodc4.CommandType = adCmdText
Adodc4.RecordSource = "select * from sell where 銷售年=" & inty & ""
Adodc4.Refresh
Set DataGrid4.DataSource = Adodc4
DataGrid4.Refresh
Adodc5.ConnectionString = str
Adodc5.CommandType = adCmdText
Adodc5.RecordSource = "select 生產廠商,sum(總金額) as 各廠商進貨總金額 from sell where 銷售年=" & inty & " and 銷售月=" & intm & " and 銷售日=" & intd & " group by 生產廠商"
Adodc5.Refresh
Set DataGrid5.DataSource = Adodc5
DataGrid5.Refresh
Adodc6.ConnectionString = str
Adodc6.CommandType = adCmdText
Adodc6.RecordSource = "select 生產廠商,sum(總金額) as 各廠商進貨總金額 from sell where 銷售年=" & inty & " and 銷售月=" & intm & " group by 生產廠商"
Adodc6.Refresh
Set DataGrid6.DataSource = Adodc6
DataGrid6.Refresh
Select Case intm
Case Is < 4
intm = 3
Case Is < 7
intm = 6
Case Is < 10
intm = 9
Case Is > 10
intm = 12
End Select
Adodc7.ConnectionString = str
Adodc7.CommandType = adCmdText
Adodc7.RecordSource = "select 生產廠商,sum(總金額) as 各廠商進貨總金額 from sell where 銷售年=" & inty & " and 銷售月 between " & (intm - 2) & " and " & intm & " group by 生產廠商"
Adodc7.Refresh
Set DataGrid7.DataSource = Adodc7
DataGrid7.Refresh
intm = Month(Date)
Adodc8.ConnectionString = str
Adodc8.CommandType = adCmdText
Adodc8.RecordSource = "select 生產廠商,sum(總金額) as 各廠商進貨總金額 from sell where 銷售年=" & inty & " group by 生產廠商"
Adodc8.Refresh
Set DataGrid8.DataSource = Adodc8
DataGrid8.Refresh
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -