I load the recordset with this qry which is strsql in the vba below
select
' ' as UltimateParent, .....etc etc from.....
Then once the field UltimateParent is in the recordset and it is open I try to modify it like this:
Set Rs1(RsLevel, RsIndex) = New ADODB.Recordset
With Rs1(RsLevel, RsIndex)
.CursorLocation = adUseClient
.CursorType = adUseClient
.LockType = adLockOptimistic
.Open strSQL, ConnACDNV
End With
Do Until Rs1(RsLevel, RsIndex).EOF
Rs1(RsLevel, RsIndex).Fields("UltimateParent").Value = "test"
Rs1(RsLevel, RsIndex).Update
Rs1(RsLevel, RsIndex).MoveNext
Loop
The error comes when I try to set the value of the first record to "test"
The error is: Multiple - step operation generates errors. Check each status value.
How do I make a qry with a hard coded column made on the fly in the select statement and then modify the data in the column with VBA once it is in the open recordset?
select
' ' as UltimateParent, .....etc etc from.....
Then once the field UltimateParent is in the recordset and it is open I try to modify it like this:
Set Rs1(RsLevel, RsIndex) = New ADODB.Recordset
With Rs1(RsLevel, RsIndex)
.CursorLocation = adUseClient
.CursorType = adUseClient
.LockType = adLockOptimistic
.Open strSQL, ConnACDNV
End With
Do Until Rs1(RsLevel, RsIndex).EOF
Rs1(RsLevel, RsIndex).Fields("UltimateParent").Value = "test"
Rs1(RsLevel, RsIndex).Update
Rs1(RsLevel, RsIndex).MoveNext
Loop
The error comes when I try to set the value of the first record to "test"
The error is: Multiple - step operation generates errors. Check each status value.
How do I make a qry with a hard coded column made on the fly in the select statement and then modify the data in the column with VBA once it is in the open recordset?