I have a form where the user will select from a combo box the table information they wish edit or add. I am using ADO and I want to pull the table down from SQL Server into a table in Access 2003. I am trying to loop through the list of field names and assign each field to a specific string. Each table has less than 15 fields so I created 15 strings as Dim strFld1 As String, Dim strFld2 As String, etc. But during my loop I want to identify which strFld? as a concatenated string combining the "strFld" and the integer counter. Below is a code sample:
rs1.Open strSQL1, cnnlocal, adOpenDynamic, adLockOptimistic
intCount = rs1.Fields.Count
intStart = 1
Do Until intStart = intCount
CStr("strFld" & intStart) = rs1.Fields(intStart - 1).Name
intStart = intStart + 1
Loop
VBA is giving error messages whether I use CStr("strFld" & intStart), strFLD & intStart, or strFld + intStart. I know there should be a simple way to get this to work but I am currently baffled
Thanks in advance for any suggestions.
rs1.Open strSQL1, cnnlocal, adOpenDynamic, adLockOptimistic
intCount = rs1.Fields.Count
intStart = 1
Do Until intStart = intCount
CStr("strFld" & intStart) = rs1.Fields(intStart - 1).Name
intStart = intStart + 1
Loop
VBA is giving error messages whether I use CStr("strFld" & intStart), strFLD & intStart, or strFld + intStart. I know there should be a simple way to get this to work but I am currently baffled

Thanks in advance for any suggestions.