>Cetin !!
>
>Thanks To Reply my message. I have try that, but were there any difference between
>
> INsert into <....> values (......)
>
>with
>
> Sele <....>
> appe Blank
> replace (....) with (....)
> .......
>
>
> Have try both but, which one have the affective result.
>
> And new problem come, my lecturer ask me to add the child table in a grid, but button to add is related to
> Formset. So how's to make it happen, cause i have try all from set filter to, etc but after closing the formset
> and back the main form, the grid just add by ' 0' record.
>
> So please, help me.
>
> By the way sorry if, you little bit hard enough to understand my English, cos i' happen to be a former.
>
> Thanks again,
>
>
> Viva Apocalypse !!!
There are some differences. First of all you don't need to change workarea or check if the table is open or not. When using grids this sometimes prevent undesirable effects.
Form or formset wouldn't matter. Just be sure you fillin the field that has foreign key info. Say you have "customer" parent table with "cust_id" primary key and would add an order into child table "orders" which also has cust_id field (as foreign key field).
insert into orders (cust_id) values (customer.cust_id)
Also make sure that you tableupdate() when you're done with "orders" (typically "save" button).
"Set filter" honestly is not something I would suggest. I use it "only" if I cannot find another way.
Check Tastrade sample and also using testdata.dbc create a one-to-many form (with wizard) and check, "txtbtns" class code in wizstyle.vcx
Cetin