0
我的表單上有兩個列表框。 對於在ConceptList中選擇的每個項目,我需要在ParkList中添加所有選擇的項目VBA在表格中插入兩個列表框值
附加的期望狀態圖像顯示了我在兩個選擇在ConceptList中創建和四個在ProspectList中時期望的內容。當前狀態顯示的代碼下面
Current State Image Desired State Image
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb()
Set rs = db.OpenRecordset("tblFinal")
For Each itm In ConceptList.ItemsSelected
rs.AddNew
rs!ConceptID = ConceptList.ItemData(itm)
rs!ParkID = ParkList.ItemData(itm)
rs.Update
Next
rs.Close
Set rs = Nothing
Set db = Nothing
End Sub
啊..這就是它。感謝您的幫助 –