|
5#
楼主 |
发表于 2008-12-26 23:15:11
|
只看该作者
回复 4# 的帖子
Private Sub JDBZDXS1(QS As Integer, JS As Integer, HS As Integer) '======指定显示页========QS--起始记录号 JS--结束记录号 HS--行数
On Error GoTo CHUCUOCHULI
Dim III, JDBLSBL, JDBQSJS 'III--循环变量, JDBLSBL--临时变量, JDBQSJS--进度表件号起始件数
Dim PP1, PP2, StrTemp1 As String
Dim Rs1 As ADODB.Recordset
Set Rs1 = New ADODB.Recordset
StrTemp1 = "Select * From JDB工序" '打开《JDB工序》数据集
Rs1.Open StrTemp1, CurrentProject.Connection, adOpenKeyset, adLockOptimistic '打开《JDB工序》数据集
If Rs1.RecordCount > QS Then
Rs1.Move QS
End If
For III = QS To JS
If QS = III Then
JDBQSJS = Rs1("件数1") '目的:消除最后一排件号、工序显示完后的《起始件数》继续显示的问题!2008.12.15
End If
JDBLSBL = JDBLSBL + 1 '为每一排的工序---排显示顺序!
Select Case HS
Case 1
JDBGZ(1, JDBLSBL) = Replace(Trim(Rs1("工种")), " ", "")
' JDBNB(1, JDBLSBL) = Rs1("工时类别")
Case 2
JDBGZ(2, JDBLSBL) = Replace(Trim(Rs1("工种")), " ", "")
' JDBNB(2, JDBLSBL) = Rs1("工时类别")
Case 3
JDBGZ(3, JDBLSBL) = Replace(Trim(Rs1("工种")), " ", "")
' JDBNB(3, JDBLSBL) = Rs1("工时类别")
Case 4
JDBGZ(4, JDBLSBL) = Replace(Trim(Rs1("工种")), " ", "")
' JDBNB(4, JDBLSBL) = Rs1("工时类别")
Case 5
JDBGZ(5, JDBLSBL) = Replace(Trim(Rs1("工种")), " ", "")
' JDBNB(5, JDBLSBL) = Rs1("工时类别")
Case 6
JDBGZ(6, JDBLSBL) = Replace(Trim(Rs1("工种")), " ", "")
' JDBNB(6, JDBLSBL) = Rs1("工时类别")
Case 7
JDBGZ(7, JDBLSBL) = Replace(Trim(Rs1("工种")), " ", "")
' JDBNB(7, JDBLSBL) = Rs1("工时类别")
Case 8
JDBGZ(8, JDBLSBL) = Replace(Trim(Rs1("工种")), " ", "")
' JDBNB(8, JDBLSBL) = Rs1("工时类别")
Case 9
JDBGZ(9, JDBLSBL) = Replace(Trim(Rs1("工种")), " ", "")
' JDBNB(9, JDBLSBL) = Rs1("工时类别")
Case 10
JDBGZ(10, JDBLSBL) = Replace(Trim(Rs1("工种")), " ", "")
' JDBNB(10, JDBLSBL) = Rs1("工时类别")
End Select
If Rs1.AbsolutePosition <= JS Then
Rs1.Move 1
End If
Next III
Rs1.Close '关闭《JDB工序》数据集
Set Rs1 = Nothing
Select Case HS |
|