文件名称:VBformatDataGrid
-
所属分类:
- 标签属性:
- 上传时间:2014-05-05
-
文件大小:89.53kb
-
已下载:1次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
我觉得这是一个相当实用的Vb数据库技巧,让VB根据字段类型自动格式化DataGrid表格中的数据,数据库连接驱动为:Provider=Microsoft.Jet.OLEDB.4.0 Data Source=db_manpower.mdb Persist Security Info=False。可将所属工资月份,员工编号,员工姓名,基本工资,加班费,工龄工资,奖励总额,职务津贴,旷工费,惩罚总额,养老保险,失业保险,应扣工资等各字段中的数据自动格式化为规定类型,子处理进程代码:
Dim fld
For Each fld In Adodc1.Recordset.Fields
如果字段类型为money,则格式化该列
If fld.Type = 6 Then
Set f1 = DataGrid1.Columns(fld.Name).DataFormat
f1.Format = "##,##0.00"
End If
Next
End Sub-I think this is a very useful Vb database skills, so VB automatically formatted according to the data field type DataGrid table, database connectivity drivers as: Provider = Microsoft.Jet.OLEDB.4.0 Data Source = db_manpower.mdb Persist Security Info = False. Month salary can be an employee number, employee name, base salary, overtime, seniority pay, total rewards, duties allowance, absenteeism costs, the total punishment, pension insurance, unemployment insurance, and other fields should be reduced if the data is automatically formats as specified type, the child deal with the process of code:
Dim fld
For Each fld In Adodc1.Recordset.Fields
If field type is money, then format the column
If fld.Type = 6 Then
Set f1 = DataGrid1.Columns (fld.Name). DataFormat
f1.Format = "##,## 0.00"
End If
Next
End Sub
Dim fld
For Each fld In Adodc1.Recordset.Fields
如果字段类型为money,则格式化该列
If fld.Type = 6 Then
Set f1 = DataGrid1.Columns(fld.Name).DataFormat
f1.Format = "##,##0.00"
End If
Next
End Sub-I think this is a very useful Vb database skills, so VB automatically formatted according to the data field type DataGrid table, database connectivity drivers as: Provider = Microsoft.Jet.OLEDB.4.0 Data Source = db_manpower.mdb Persist Security Info = False. Month salary can be an employee number, employee name, base salary, overtime, seniority pay, total rewards, duties allowance, absenteeism costs, the total punishment, pension insurance, unemployment insurance, and other fields should be reduced if the data is automatically formats as specified type, the child deal with the process of code:
Dim fld
For Each fld In Adodc1.Recordset.Fields
If field type is money, then format the column
If fld.Type = 6 Then
Set f1 = DataGrid1.Columns (fld.Name). DataFormat
f1.Format = "##,## 0.00"
End If
Next
End Sub
(系统自动生成,下载前可以参看下载内容)
下载文件列表
VB根据字段自动格式化DataGrid表格中的数据/db_manpower.mdb
VB根据字段自动格式化DataGrid表格中的数据/main_gzgl.frm
VB根据字段自动格式化DataGrid表格中的数据/main_gzgl.frx
VB根据字段自动格式化DataGrid表格中的数据/main_gzgl_gzgl.frx
VB根据字段自动格式化DataGrid表格中的数据/工程1.vbp
VB根据字段自动格式化DataGrid表格中的数据/工程1.vbw
VB根据字段自动格式化DataGrid表格中的数据
VB根据字段自动格式化DataGrid表格中的数据/main_gzgl.frm
VB根据字段自动格式化DataGrid表格中的数据/main_gzgl.frx
VB根据字段自动格式化DataGrid表格中的数据/main_gzgl_gzgl.frx
VB根据字段自动格式化DataGrid表格中的数据/工程1.vbp
VB根据字段自动格式化DataGrid表格中的数据/工程1.vbw
VB根据字段自动格式化DataGrid表格中的数据
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
