📄 formbmfc.frm
字号:
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hgrs;Data Source=SERVER"
OLEDBString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hgrs;Data Source=SERVER"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "bmftk"
Caption = "Adcbmftk"
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 MSAdodcLib.Adodc Adcftcount
Height = 330
Left = 2160
Top = 5520
Visible = 0 'False
Width = 2055
_ExtentX = 3625
_ExtentY = 582
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 = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hgrs;Data Source=SERVER"
OLEDBString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hgrs;Data Source=SERVER"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adcftcount"
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 MSAdodcLib.Adodc Adcbm
Height = 330
Left = 480
Top = 5520
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_ExtentY = 582
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 = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hgrs;Data Source=SERVER"
OLEDBString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=hgrs;Data Source=SERVER"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adcbm"
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 Label1
Caption = "报表处理月份 "
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H8000000D&
Height = 375
Left = 360
TabIndex = 2
Top = 480
Width = 1575
End
End
Attribute VB_Name = "Formbmftk"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim vbmid, vbmname, vmonth, vcxm, vczm, vcwm, vcym
Dim cxc, czc, cwc, cyc, cmc
Private Sub Command1_Click()
If Textmonth.Text = "" Then
MsgBox ("请输入月份")
Else
vmonth = CInt(Textmonth.Text)
Adcbm.RecordSource = "select * from tbm where bmid<>''order by bmid"
Adcbm.Refresh
cxc = 0
czc = 0
cwc = 0
cyc = 0
cmc = 0
Do While Not Adcbm.Recordset.EOF
vcxm = 0
vczm = 0
vcwm = 0
vcym = 0
vbmid = Adcbm.Recordset.Fields("bmid").Value
vbmname = Adcbm.Recordset.Fields("bmname").Value
Adcftcount.RecordSource = "select * from ftcount where bmid='" & vbmid & "'"
Adcftcount.Refresh
Do While Not Adcftcount.Recordset.EOF
vcxm = vcxm + Adcftcount.Recordset.Fields("xzf").Value
vczm = vczm + Adcftcount.Recordset.Fields("zzf").Value
vcwm = vcwm + Adcftcount.Recordset.Fields("wzf").Value
vcym = vcym + Adcftcount.Recordset.Fields("yzf").Value
Adcftcount.Recordset.MoveNext
Loop
cxc = cxc + vcxm
czc = czc + vczm
cwc = cwc + vcwm
cyc = cyc + vcym
Adcbmftk.RecordSource = "select * from bmftk where bmid='" & vbmid & "'"
Adcbmftk.Refresh
If Adcbmftk.Recordset.EOF Then
Adcbmftk.Recordset.AddNew
Adcbmftk.Recordset.Fields("bmid").Value = vbmid
Adcbmftk.Recordset.Fields("bmname").Value = vbmname
If vcxm <> 0 Then
Adcbmftk.Recordset.Fields("cxm").Value = vcxm * 3
End If
If vczm <> 0 Then
Adcbmftk.Recordset.Fields("czm").Value = vczm * 3
End If
If vcwm <> 0 Then
Adcbmftk.Recordset.Fields("cwm").Value = vcwm * 3
End If
If vcym <> 0 Then
Adcbmftk.Recordset.Fields("cym").Value = vcym * 3
End If
Adcbmftk.Recordset.Fields("cmonth").Value = vmonth
Adcbmftk.Recordset.update
End If
Adcbm.Recordset.MoveNext
Loop
Adcbmftk.Recordset.AddNew
Adcbmftk.Recordset.Fields("bmid").Value = "本月"
Adcbmftk.Recordset.Fields("bmname").Value = "合计"
If cxc <> 0 Then
Adcbmftk.Recordset.Fields("cxm").Value = cxc * 3
End If
If czc <> 0 Then
Adcbmftk.Recordset.Fields("czm").Value = czc * 3
End If
If cwc <> 0 Then
Adcbmftk.Recordset.Fields("cwm").Value = cwc * 3
End If
If cyc <> 0 Then
Adcbmftk.Recordset.Fields("cym").Value = cyc * 3
End If
Adcbmftk.Recordset.Fields("cmonth").Value = vmonth
Adcbmftk.Recordset.update
End If
End Sub
Private Sub Command2_Click()
CRep1.Action = 0
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Command4_Click()
Adcbmftk.RecordSource = " select * from bmftk where bmid<>''"
Adcbmftk.Refresh
Do While Not Adcbmftk.Recordset.EOF
Adcbmftk.Recordset.Delete
Adcbmftk.Recordset.update
Adcbmftk.Recordset.MoveNext
If Adcbmftk.Recordset.EOF Then
Exit Do
End If
Loop
End Sub
Private Sub Command6_Click()
CRep2.Action = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -