>How to insert the ID from parent's table while entering new records in the child's grid? Should I use BeforeRowColChange?
>
>Chuck
Chuck,
AfterRowColChange if you're gonna take that route. There are at least 3 ways. If you're using allowaddnew or append blank then you could use :
*AfterRowColChange
if empty(nvl(myChild.myId,""))
replace myChild.myId with myParent.ID
endif
Or :
in DBC set field's default value to something like :
iif(used("myParent"),myParent.ID,sys(2015))
If you're SQL inserting then you could just say :
insert into myChild (myId) values (myParent.ID)
Cetin