📄 rzgl_f.frm
字号:
Top = 6480
Width = 975
End
Begin MSDataGridLib.DataGrid MSHFlexGrid1
Bindings = "rzgl_f.frx":030A
Height = 4695
Left = 120
TabIndex = 14
Top = 1560
Width = 10695
_ExtentX = 18865
_ExtentY = 8281
_Version = 393216
AllowUpdate = 0 'False
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 5
BeginProperty Column00
DataField = "卡号"
Caption = "卡号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
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
BeginProperty Column02
DataField = "班级"
Caption = "班级"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "自费金额"
Caption = "自费金额"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
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
Size = 156
BeginProperty Column00
ColumnWidth = 1574.929
EndProperty
BeginProperty Column01
ColumnWidth = 1349.858
EndProperty
BeginProperty Column02
ColumnWidth = 1349.858
EndProperty
BeginProperty Column03
ColumnWidth = 1409.953
EndProperty
BeginProperty Column04
ColumnWidth = 1620.284
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Align = 2 'Align Bottom
Height = 330
Left = 0
Top = 6990
Width = 10980
_ExtentX = 19368
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 0
BackColor = -2147483643
ForeColor = 255
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=nccc.mdb"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=nccc.mdb"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = $"rzgl_f.frx":031F
Caption = "计算中心计费系统"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
End
Attribute VB_Name = "rzgl_f"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
On Error GoTo a:
If Len(Text1.Text) = 0 Or Len(Text2.Text) = 0 Or Len(Text4.Text) = 0 Then Exit Sub
If Option1.Value = True Then
i = Text1.Text
j = Text2.Text
If j < i Then Exit Sub
For k = i To j
temp = k
If Len(temp) = 0 Then temp = "0000000"
If Len(temp) = 1 Then temp = "000000" & temp
If Len(temp) = 2 Then temp = "00000" & temp
If Len(temp) = 3 Then temp = "0000" & temp
If Len(temp) = 4 Then temp = "000" & temp
If Len(temp) = 5 Then temp = "00" & temp
If Len(temp) = 6 Then temp = "0" & temp
sql = "select * from 总帐表 where 卡号='" & temp & "'"
Set rs = conn.Execute(sql)
If rs.EOF Or rs.BOF Then
MsgBox temp & "无此用户!"
Else
sql = "update 总帐表 set 自费金额 =自费金额+" & Val(Text4.Text) & " where 卡号='" & temp & "'"
conn.Execute sql
sql = "insert into 账目明细 (卡号,金额,性质,入账日期,经手人) values ('" & temp & "'," & Val(Text4.Text) & ",'自费','" & Date & "','" & glymc & "')"
conn.Execute sql
End If
Next
MsgBox "金额入库完成!"
Adodc1.Refresh
End If
If Option2.Value = True Then
i = Text1.Text
j = Text2.Text
If j < i Then Exit Sub
For k = i To j
temp = k
If Len(temp) = 0 Then temp = "0000000"
If Len(temp) = 1 Then temp = "000000" & temp
If Len(temp) = 2 Then temp = "00000" & temp
If Len(temp) = 3 Then temp = "0000" & temp
If Len(temp) = 4 Then temp = "000" & temp
If Len(temp) = 5 Then temp = "00" & temp
If Len(temp) = 6 Then temp = "0" & temp
sql = "select * from 总帐表 where 卡号='" & temp & "'"
Set rs = conn.Execute(sql)
If rs.EOF Or rs.BOF Then
MsgBox temp & "无此用户!"
Exit Sub
Else
sql = "update 总帐表 set 教学金额 =教学金额+" & Val(Text4.Text) & " where 卡号='" & temp & "'"
conn.Execute sql
sql = "insert into 账目明细 (卡号,金额,性质,入账日期,经手人) values ('" & temp & "'," & Val(Text4.Text) & ",'教学','" & Date & "','" & glymc & "')"
conn.Execute sql
End If
Next
MsgBox "金额入库完成!"
Adodc1.Refresh
End If
Exit Sub
a:
MsgBox "金额入库错误!"
End Sub
Private Sub Command2_Click()
On Error GoTo a:
If Option3.Value = True Then
If Len(Text3.Text) = 0 Or Len(Text5.Text) = 0 Then Exit Sub
temp = Text3.Text
sql = "select * from 总帐表 where 卡号='" & temp & "'"
Set rs = conn.Execute(sql)
If rs.EOF Or rs.BOF Then
MsgBox temp & "无此用户!"
Exit Sub
End If
sql = "update 总帐表 set 自费金额 =自费金额+" & Val(Text5.Text) & " where 卡号='" & temp & "'"
conn.Execute sql
sql = "insert into 账目明细 (卡号,金额,性质,入账日期,经手人) values ('" & temp & "'," & Val(Text5.Text) & ",'自费','" & Date & "','" & glymc & "')"
conn.Execute sql
MsgBox "金额入库创建完成!"
Adodc1.Refresh
End If
If Option4.Value = True Then
If Len(Text3.Text) = 0 Or Len(Text5.Text) = 0 Then Exit Sub
temp = Text3.Text
sql = "select * from 总帐表 where 卡号='" & temp & "'"
Set rs = conn.Execute(sql)
If rs.EOF Or rs.BOF Then
MsgBox temp & "无此用户!"
Exit Sub
End If
sql = "update 总帐表 set 教学金额 =教学金额+" & Val(Text5.Text) & " where 卡号='" & temp & "'"
conn.Execute sql
sql = "insert into 账目明细 (卡号,金额,性质,入账日期,经手人) values ('" & temp & "'," & Val(Text5.Text) & ",'教学','" & Date & "','" & glymc & "')"
conn.Execute sql
MsgBox "金额入库创建完成!"
Adodc1.Refresh
End If
Exit Sub
a:
MsgBox "金额入库错误!"
Adodc1.Refresh
End Sub
Private Sub Command3_Click()
Adodc1.Refresh
End Sub
Private Sub Command4_Click()
If Adodc1.Recordset.EOF Or Adodc1.Recordset.BOF Then Exit Sub
temp = Adodc1.Recordset("卡号")
sql = "delete * from 总帐表 where 卡号='" & temp & "'"
conn.Execute sql
MsgBox temp & "账号删除完成!"
Adodc1.Refresh
End Sub
Private Sub Command5_Click()
Unload Me
End Sub
Private Sub Command6_Click()
sql = "delete * from 总帐表 where 卡号 not in (select 卡号 from 基本表)"
conn.Execute sql
MsgBox temp & "金额入库整理完成!"
Adodc1.Refresh
End Sub
Private Sub Form_Load()
conn.Open connstr
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set conn = Nothing
Set rs = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -