2015-09-01 111 views

回答

0

要選擇的數據,最好是使用一個listfield ,然後將數據與VB節目表中的複製:

set rs1=currendb.openrecordset ("NAME OF TABLE) 
For Z = 0 To Me.ListField.ListCount - 1 
    If Me.ListField.Selected(Z) = True Then 
     Rs1.addnew 
     rs1!field1 = Me.LisField.Column(0, Z) 
     rs1!field2 = Me.LisField.Column(1, Z)  
    End If 
next z 
1

Form.SelTop和.SelHeight是這裏的關鍵屬性。

實施例與subform.RecordsetClone循環:

Set F = Me.Subform.Form 
Set RS = F.RecordsetClone 
RS.MoveFirst 
' goto first selected record 
RS.Move F.SelTop - 1 
' loop over all selected records 
For i = 1 To F.SelHeight 
    ' do something with fields from RS 
    RS.MoveNext 
Next i 
相關問題