本文介绍了插入记录集数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 嘿那里.... 我使用记录集从表中提取一些数据,然后将数据转储到新表中。 我的代码如下,工作正常,但我正在寻求帮助将其转储到新表中。 任何帮助都将不胜感激。 - 艺术 私有子Form_Load() Dim rs0作为Recordset Dim ArraySplit()As String Dim n As Integer 设置rs0 = CurrentDb.OpenRecordset(" UserFile") > rs0.OpenRecordset Do rs0.EOF ArraySplit = Split(rs0![GroupList],"〜") 对于n = 0到UBound(ArraySplit) Debug.Print rs0![User]&英寸;" &安培; rs0![姓名]&英寸;" &安培; _ rs0![经理]&英寸;" &安培; ArraySplit(n) 下一页n rs0.MoveNext 循环 rs0.Close End Sub Hey there.... I am using a recordset to pull some data out of a table and in turn dump that data into a new table. My code is as follows and works fine, but I am looking for assistance in dumping this into the new table. Any help would be greatly appreciated. --Art Private Sub Form_Load()Dim rs0 As RecordsetDim ArraySplit() As StringDim n As IntegerSet rs0 = CurrentDb.OpenRecordset("UserFile") rs0.OpenRecordset Do Until rs0.EOF ArraySplit = Split(rs0![GroupList], "~") For n = 0 To UBound(ArraySplit) Debug.Print rs0![User] & ";" & rs0![Name] & ";" & _ rs0![Mgr] & ";" & ArraySplit(n) Next n rs0.MoveNextLoop rs0.Close End Sub推荐答案 你要插入的表是什么样的?换句话说,另一个表中的哪些字段以及当前记录集中要插入哪些字段?What will the table you''re inserting into look like? In otherwords what fields are in the other table and what fields from the current recordset do you want to insert? 感谢您的回复。 我在新表中需要的唯一字段是上面的记录集中的字段+一个UID。 GroupList 用户 名称 Mgr Thanks for the reply. The only fields I need in the new table are the ones in the recordset above + a UID. GroupListUserNameMgr 确定所有字段都包含哪些数据类型?它们是文本,数字还是日期。 UID是自动编号吗?Ok and what data types are all the fields? Are they text or numbers or dates.Is the UID going to be an autonumber? 这篇关于插入记录集数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-22 08:49