Hi Cummunity,
Needing some help to concatenate row values being retrieved from ACCESS Database. INstead of writing to multiple rows, i need to concatenate all the record set values and write it to a single cell.
Here is a view of part of my code: Currently there are two rows in the database that meet this condition. This would write the first record to TargetRange + 1 which TargetRange = K44. The second row would then be written to K45 + 1. I need to either loop through the records or concatenate them to write the records to a single cell / row. Any guidance?
Needing some help to concatenate row values being retrieved from ACCESS Database. INstead of writing to multiple rows, i need to concatenate all the record set values and write it to a single cell.
Here is a view of part of my code: Currently there are two rows in the database that meet this condition. This would write the first record to TargetRange + 1 which TargetRange = K44. The second row would then be written to K45 + 1. I need to either loop through the records or concatenate them to write the records to a single cell / row. Any guidance?
Code:
' QUERY FOR (PENDING VACATION)
rs31.Open "SELECT Request_Date FROM Vacation WHERE EID ='" & Worksheets("Sched").Range("N17") & "' And Request_Status = 0", cn, , , adCmdText
' Write the field names (PENDING VACATION)
For intColIndex = 0 To rs31.Fields.Count - 1
TargetRange31.Offset(1, intColIndex).Value = rs31.Fields(intColIndex).Name
Next
' Write recordset (PENDING VACATION)
TargetRange31.Offset(1, 0).CopyFromRecordset rs31