8
85ascMcLaren
What am I doing wrong that I have forgotten or is stupid?
I am creating a recordset in the report
I have created a textbox called 'txtCase' in the detail section.
I am looping through the recordset:
strSql = "Select a.[case#], a.name_1, b.niin " & _
"from PIPSFF17 a, PIPSFF01_CASE b " & _
"Where b.corp = 'H' and a.[case#] =b.[case#] and a.name_1='" &
gFullName & "'"
Set rsDao = CurrentDb.OpenRecordset(strSql, dbOpenForwardOnly, dbReadOnly)
Do Until rsDao.EOF
txtCase = rs![case#]
rsDao.MoveNext
Loop
rsDao.Close
Set rsDao = Nothing
The only record that appears to get written is the last record in the
recordset. In other words, the detail is not showing the detail. It is
overwriting the txtCase textbox with only the last one showing obviously. I
have tried putting the code in the detail section, print, form open, and the
format section with no such luck.
What obvious mistake am I making......
Thanks,
Jason
I am creating a recordset in the report
I have created a textbox called 'txtCase' in the detail section.
I am looping through the recordset:
strSql = "Select a.[case#], a.name_1, b.niin " & _
"from PIPSFF17 a, PIPSFF01_CASE b " & _
"Where b.corp = 'H' and a.[case#] =b.[case#] and a.name_1='" &
gFullName & "'"
Set rsDao = CurrentDb.OpenRecordset(strSql, dbOpenForwardOnly, dbReadOnly)
Do Until rsDao.EOF
txtCase = rs![case#]
rsDao.MoveNext
Loop
rsDao.Close
Set rsDao = Nothing
The only record that appears to get written is the last record in the
recordset. In other words, the detail is not showing the detail. It is
overwriting the txtCase textbox with only the last one showing obviously. I
have tried putting the code in the detail section, print, form open, and the
format section with no such luck.
What obvious mistake am I making......
Thanks,
Jason