仅供学习参考 ~~
工资管理系统~
vb+sql
有其他需要请和我联系
源代码在线查看: frm公式修改.frm
VERSION 5.00
Begin VB.Form frm公式修改
BorderStyle = 3 'Fixed Dialog
Caption = "zztjk"
ClientHeight = 2355
ClientLeft = 1095
ClientTop = 330
ClientWidth = 7365
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2355
ScaleWidth = 7365
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Com2
Caption = "统计表达式:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 60
TabIndex = 13
Top = 780
Width = 1485
End
Begin VB.CommandButton Com1
Caption = "统计条件:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 60
TabIndex = 12
Top = 390
Width = 1485
End
Begin VB.ComboBox Combo1
Height = 300
Left = 3180
Style = 2 'Dropdown List
TabIndex = 8
Top = 30
Width = 1965
End
Begin VB.PictureBox picButtons
Align = 2 'Align Bottom
Appearance = 0 'Flat
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 420
Left = 0
ScaleHeight = 420
ScaleWidth = 7365
TabIndex = 4
Top = 1530
Width = 7365
Begin VB.CommandButton cmd放弃
Caption = "放弃(&Q)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 4944
TabIndex = 11
Top = 60
Width = 1095
End
Begin VB.CommandButton cmd修改
Caption = "修改(&E)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 2532
TabIndex = 10
Top = 60
Width = 1095
End
Begin VB.CommandButton cmd保存
Caption = "保存(&S)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 3750
TabIndex = 9
Top = 60
Width = 1095
End
Begin VB.CommandButton cmd关闭
Caption = "关闭(&C)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 6150
TabIndex = 7
Top = 60
Width = 1095
End
Begin VB.CommandButton cmd删除
Caption = "删除(&D)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 1326
TabIndex = 6
Top = 60
Width = 1095
End
Begin VB.CommandButton cmd添加
Caption = "添加(&A)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 120
TabIndex = 5
Top = 60
Width = 1095
End
End
Begin VB.Data datPrimaryRS
Align = 2 'Align Bottom
Caption = " "
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 405
Left = 0
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 1950
Width = 7365
End
Begin VB.TextBox txtFields
DataField = "统计公式"
DataSource = "datPrimaryRS"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 645
Index = 2
Left = 1590
MaxLength = 254
MultiLine = -1 'True
ScrollBars = 1 'Horizontal
TabIndex = 3
Top = 780
Width = 5715
End
Begin VB.TextBox txtFields
DataField = "统计条件"
DataSource = "datPrimaryRS"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
Index = 1
Left = 1590
MaxLength = 254
TabIndex = 2
Top = 380
Width = 5715
End
Begin VB.TextBox txtFields
DataField = "统计字段"
DataSource = "datPrimaryRS"
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Index = 0
Left = 1470
MaxLength = 6
TabIndex = 1
Top = 30
Width = 1665
End
Begin VB.Label lblLabels
Caption = "统计字段:"
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 120
TabIndex = 0
Top = 60
Width = 1245
End
End
Attribute VB_Name = "frm公式修改"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim hxftjbj As Boolean
Dim hxfi As Integer
Option Explicit
Private Sub cmd保存_Click()
If Len(Trim(txtFields(0).Text)) > 0 And Len(Trim(txtFields(2).Text)) > 0 Then
datPrimaryRS.UpdateRecord
datPrimaryRS.Recordset.Bookmark = datPrimaryRS.Recordset.LastModified
cmd删除.Enabled = True
cmd修改.Enabled = True
cmd关闭.Enabled = True
cmd保存.Enabled = False
cmd放弃.Enabled = False
cmd添加.Enabled = True
Combo1.Enabled = False
Com1.Enabled = False
Com2.Enabled = False
txtFields(1).Enabled = False
txtFields(2).Enabled = False
frm公式修改.Refresh
Else
hxfyn = MsgBox("统计字段和统计表达式不能为空!,请选择!", 48)
End If
End Sub
Private Sub cmd放弃_Click()
cmd删除.Enabled = True
cmd修改.Enabled = True
cmd关闭.Enabled = True
cmd保存.Enabled = False
cmd放弃.Enabled = False
cmd添加.Enabled = True
Combo1.Enabled = False
Com1.Enabled = False
Com2.Enabled = False
frm公式修改.Refresh
datPrimaryRS.Refresh
'If hxftjbj = True Then datPrimaryRS.Recordset.MoveLast
'If hxftjbj = False Then
datPrimaryRS.UpdateControls
txtFields(1).Enabled = False
txtFields(2).Enabled = False
End Sub
Private Sub cmd添加_Click()
datPrimaryRS.Recordset.AddNew
cmd删除.Enabled = False
cmd修改.Enabled = False
cmd关闭.Enabled = False
cmd保存.Enabled = True
cmd放弃.Enabled = True
cmd添加.Enabled = False
Combo1.Enabled = True
Com1.Enabled = True
Com2.Enabled = True
txtFields(1).Enabled = True
txtFields(2).Enabled = True
End Sub
Private Sub cmd删除_Click()
hxfyn = MsgBox("是否真的删除?", 36)
If hxfyn = vbYes Then
With datPrimaryRS.Recordset
If Not .EOF Then
.Delete
.MoveNext
If .EOF And .RecordCount 0 Then .MoveLast
If .EOF And .RecordCount = 0 Then .MoveFirst
End If
End With
frm公式修改.Refresh
End If
End Sub
Private Sub cmd关闭_Click()
Screen.MousePointer = vbDefault
Unload Me
End Sub
Private Sub cmd修改_Click()
cmd删除.Enabled = False
cmd修改.Enabled = False
cmd关闭.Enabled = False
cmd保存.Enabled = True
cmd放弃.Enabled = True
cmd添加.Enabled = False
Combo1.Enabled = True
Com1.Enabled = True
Com2.Enabled = True
txtFields(1).Enabled = True
txtFields(2).Enabled = True
End Sub
Private Sub Com1_Click()
hxfbds = txtFields(1).Text
frm表达式生成.Show 1
txtFields(1).Text = hxfbds
End Sub
Private Sub Com2_Click()
hxfbds = txtFields(2).Text
frm表达式生成.Show 1
txtFields(2).Text = hxfbds
End Sub
Private Sub Combo1_Click()
If Combo1.Text = "应发合计" Then
txtFields(0).Text = "应发合计"
GoTo en:
End If
If Combo1.Text = "代扣合计" Then
txtFields(0).Text = "代扣合计"
GoTo en:
End If
If Combo1.Text = "实发现金" Then
txtFields(0).Text = "实发现金"
GoTo en:
End If
tb1.MoveFirst
hxfi = 1
Do While hxfi If tb1.Fields(hxfi - 1).Value = Combo1.Text Then
txtFields(0).Text = tb1.Fields(hxfi - 1).Name
Exit Do
Else
hxfi = hxfi + 1
End If
Loop
en: End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyPageUp And Not datPrimaryRS.Recordset.BOF Then
datPrimaryRS.Recordset.MovePrevious
If datPrimaryRS.Recordset.BOF Then datPrimaryRS.Recordset.MoveFirst
End If
If KeyCode = vbKeyPageDown And Not datPrimaryRS.Recordset.EOF Then
datPrimaryRS.Recordset.MoveNext
If datPrimaryRS.Recordset.EOF Then datPrimaryRS.Recordset.MoveLast
End If
End Sub
Private Sub Form_Load()
Combo1.Enabled = False
Com1.Enabled = False
Com2.Enabled = False
cmd删除.Enabled = True
cmd修改.Enabled = True
cmd关闭.Enabled = True
cmd保存.Enabled = False
cmd放弃.Enabled = False
cmd添加.Enabled = True
txtFields(1).Enabled = False
txtFields(2).Enabled = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
Screen.MousePointer = vbDefault
End Sub
|
相关资源 |
|
-
仅供学习参考 ~~
工资管理系统~
vb+sql
有其他需要请和我联系
-
一个用C#开的网站购物交易系统,带源码仅供学习参考
上海普联网络科技有限公司
-
超酷toyota汽车广告flash源文件,下载仅供学习参考,不承担任何法律责任.
-
工资管理系统,vb做的..还可以!
希望大家多多上传源码到此!
-
这个程序实现了在网络上截获邮件数据并还原邮件。仅供学习参考
-
一个自制的MP3播放器
转载六国电子收集整理,仅供学习参考
-
Mysql与VC.NET连接,实现功能: 添加删除修改,注:检索功能未实现,感兴趣的朋友可以研究一下, 仅供学习参考用!
-
员工培训管理系统vb+sql源代码+可执行文件+论文+开题报稿+答辩ppt,给需要的朋友参考参考
|