Cor,
I must not be explaining this correctly.
I can see that I could display a child field and even retrieve it but that
is not adequate, I need to update the master table.
I start with a DataTable, SOs with 2 fields that contain 'Nulls', UnitsTo
and UnitsConv.
I need to populate these two fields.
Taking 1st Field as an example, UnitsTo, populating it involves:
find matching records in a Table ItemMaster. ItemMaster has fields including
ItemProd and ItemToUnits.
Matching records are found using SOProd = ItemProd And SOWhs = ItemWhs
First stage involves Updating [SOs].UnitsTo with value of
[ItemMaster ].ItemToUnits
Not all records in SOs has a matching record in ItemMaster so not all
records will be updated
Next stage involves Updating [SOs].UnitsTo with value from
[SOs].UnitsStocking
Updating [SO].UnitsConv is even more complicated.
I suppose that I can create a relationship between SOs and ItemMaster
Then itterate through SOs
and use the code in the link you provided to return the value of ItemToUnits
if there is a matching record
and use it to update SOs.UnitsTo
and if there is not a matching record then use SOs.UnitsStocking to update
SOs.UnitsTo
This is better than itterating both tables but still involves itterating
SOs.
Is that the way you would achieve the result?
Greg
"Cor Ligthert" <no************@planet.nl> wrote in message
news:O3**************@TK2MSFTNGP09.phx.gbl...
Greg,
You can get a(the) child row(s) using a relation, the same is for the
parent
http://msdn.microsoft.com/library/de...drowstopic.asp
I hope this helps,
Cor