>Sorry, once I thought about it, i'll need to have the text in my view and set the combobox.boundcolumn to the text field and in the valid event set the FK field.
Ok, try next construction.
In main prog:
use Invm
use Itty order iid in 0
sele Invm
set rela to IttiId into Itty
oForm = CreateObj...
In class designer:
Grid.RecordSourceType = 2
Grid.RecordSource = "Invm"
Grid.Column1.ControlSource = "Itty.cName"
Grid.Column1.Sparse = .T. - default
Grid.Column1.Combo1.RowSourceType = 6
Grid.Column1.Combo1.RowSource = "Itty.cName"
Grid.Column1.Combo1.BoundTo = .T.
Grid.Column1.Combo1.BoundColumn = 1
In Grid.Column1.Combo1.Click():
iCode = Itty.Iid
sele Invm
repl Invm.IttyId with iCode
I think that you'll see what you want.
Regards,
Dmitri Alexandrov