Link master/detail table by code?

I could link master/detail by table setup with Multi-page, Table-specific Options and Master/Detail(phycycal)
Now, could I link master/detail table by code?
Many thanks!

Unfortunately, no.