G
Guest
Hi,
I have a problem by writing content in my DataTable. All is working
fine, but when I refer to the last row (or better: all rows before the
activeRow), I can't manipulate the fields. Nothing happens...
My code goes something like this:
Dim dtFragebogen As dbFragebogen.dtFragebogenDataTable
Dim taFragebogen As New
dbFragebogenTableAdapters.dtFragebogenTableAdapter
Dim rowTemp As dbFragebogen.dtFragebogenRow
'here I get the data
taFragebogen.dtFragebogen = .getFBbyFktNrFB(1, activeAnzeige, 1)
With dtFragebogen
activeRow = -1
For Each rowTemp In dtFragebogen
activeRow = activeRow + 1
If activeRow > 5 Then
'*** this works fine ***
.Rows(activeRow).Item("Steuerung") = 888
'*** this doesn't work ***
.Rows(activeRow - 1).Item("Steuerung") = 999
End If
next rowTemp
end With
Where is the problem and how can I fix it???
Thanks, Kersten
I have a problem by writing content in my DataTable. All is working
fine, but when I refer to the last row (or better: all rows before the
activeRow), I can't manipulate the fields. Nothing happens...
My code goes something like this:
Dim dtFragebogen As dbFragebogen.dtFragebogenDataTable
Dim taFragebogen As New
dbFragebogenTableAdapters.dtFragebogenTableAdapter
Dim rowTemp As dbFragebogen.dtFragebogenRow
'here I get the data
taFragebogen.dtFragebogen = .getFBbyFktNrFB(1, activeAnzeige, 1)
With dtFragebogen
activeRow = -1
For Each rowTemp In dtFragebogen
activeRow = activeRow + 1
If activeRow > 5 Then
'*** this works fine ***
.Rows(activeRow).Item("Steuerung") = 888
'*** this doesn't work ***
.Rows(activeRow - 1).Item("Steuerung") = 999
End If
next rowTemp
end With
Where is the problem and how can I fix it???
Thanks, Kersten