Perhaps:
UPDATE tbltest as o
SET Planned =
(
Select Planned FROM tbltest
WHERE keyfield=
(
SELECT max(keyfield) FROM tbltest
WHERE Planned is not null and keyfield<o.keyfield
)
)
WHERE Planned Is Null
likeyeah wrote:
> Been having a play with a recordset method of doing this, practicing
> with a test table. The code below picks up when it is null or not,
> but getting errors trying to put in the previous value into the
> current record, then moving on again.
>
> Also will need error trapping in case the first record is null..
>
> J
>
<snip>
|