jt463
IS-IT--Management
- Nov 23, 2005
- 134
What syntax would I need to add text to an existing record?
If I have the following records on a table1:
Color
Red
Blue
and I want to create a table2 with a field called 'AllRecords' that would look like this:
AllRecords
Red, Blue
I would use the following code to create the table2 record:
That is the point I get stuck. I want to edit the rst2!AllRecords by adding ", " and then the next record from rst!Color.
Any help would be greatly appreciated!
If I have the following records on a table1:
Color
Red
Blue
and I want to create a table2 with a field called 'AllRecords' that would look like this:
AllRecords
Red, Blue
I would use the following code to create the table2 record:
Code:
Set db = CurrentDb
Set rst = db.OpenRecordset("select Color from table1")
Set db2 = CurrentDb
Set rst2 = db2.OpenRecordset("select * from table2")
rst.MoveFirst
rst2.AddNew
rst2!AllRecords = rst!Color
rst2.Update
rst.MoveNext
rst2.[b]???[/b]
That is the point I get stuck. I want to edit the rst2!AllRecords by adding ", " and then the next record from rst!Color.
Any help would be greatly appreciated!