U
ursula
I am trying to populate a field in a table (cumulative)
based on data in another table (team). For each record
in 'cumulative' I have a shift and date and I want to find
the corresponding date and shift in 'team' and write this
team field value to 'cumulative'. The code runs, but is
just writing the shift (not team) to the team field
in 'cumulative. Any help is apreciated.
Ursula
Do While Not (rsCumulative.EOF)
Day = rsCumulative!Date
Shift = rsCumulative!Shift
rsTeam.FindFirst rsTeam!Date = Day
If Shift = rsTeam!Shift Then
rsCumulative.Edit
rsCumulative!team = rsTeam!team
rsCumulative.Update
Else
rsTeam.FindLast rsTeam!date = Day
team = rsTeam!team
rsCumulative.Edit
rsCumulative!team = rsTeam!Team
rsCumulative.Update
End If
rsCumulative.MoveNext
Loop
based on data in another table (team). For each record
in 'cumulative' I have a shift and date and I want to find
the corresponding date and shift in 'team' and write this
team field value to 'cumulative'. The code runs, but is
just writing the shift (not team) to the team field
in 'cumulative. Any help is apreciated.
Ursula
Do While Not (rsCumulative.EOF)
Day = rsCumulative!Date
Shift = rsCumulative!Shift
rsTeam.FindFirst rsTeam!Date = Day
If Shift = rsTeam!Shift Then
rsCumulative.Edit
rsCumulative!team = rsTeam!team
rsCumulative.Update
Else
rsTeam.FindLast rsTeam!date = Day
team = rsTeam!team
rsCumulative.Edit
rsCumulative!team = rsTeam!Team
rsCumulative.Update
End If
rsCumulative.MoveNext
Loop