表 T 含有一个字段A、B: $ 我编的代码把整个表按整体编码,没有分组的效果
A B A B $
aa 0 aa 1 $ Dim rs As Recordset
aa 0 aa 2 $ Dim a As String
aa 0 aa 3 $ Dim ii as integer
bb 0 bb 1 $ ii =1
bb 0 bb 2 $ a = "select B from T where A = T.A"
bb 0 bb 3 $ Set rs = CurrentDb.OpenRecordset(a)
bb 0 bb 4 $ If rs.RecordCount > 0 Then
bb 0 bb 5 $ Do While Not rs.EOF
cc 0 cc 1 $ With rs
cc 0 cc 2 $ .Edit .Fields(0) = ii .Update End With
在Access中,如何将B变成右边的样子? $ rs.MoveNext ii = ii + 1 Loop End If
[此贴子已经被作者于2007-3-13 12:43:39编辑过]
|