hi,
thank you very much for reply help and idea for 2 grids
best regards.
m.qasem
>>hi all,
>>would you help me,
>>
>>i want to get fields form 2 tables to mygrid as under
>>table1 have course number,course name
>>table 2 have g1,g2,wm1,g3,tot1,chr1,g4,g5,wm1,g6,tot2,ltot,chr2
>>
>>i need to see at mygrid1 course name from table1
>>and g1,g2,wm1,g3,tot1,chr1,g4,g5,wm1,g6,tot2,ltot,chr2
>>from table2
>>
>>and i need to save(append) at table2 COURSE NUMBER from table1
>>and all records have g1,g2,wm1,g3,tot1,chr1,g4,g5,wm1,g6,tot2,ltot,chr2
>>
>>course name g1 g2 wm1 g3 tot1 chr1 g4 g5 wm1 g6 tot2 ltot chr2
>> math 14.5 12 7 40 73.5 ..............................
>> since .............................................................
>> .
>> .
>> .
>> .
>> .
>>
>>
>>thanks.
>>m.qasem
>
>Mohammed,
>There is some typo in your message I think. A table cannot have 2 fields with the same name.
>Tot in your sample seems to be sum of g1,g2,wm1,g3 fields and thus is redundant data (unless if it's something editable for adjustments).
>Anyway you can do it selecting to a cursor or with relations. With relations after setting your relation:
>-set skip to 2nd table if it's a one-to-many relation (or use 2 grids)
>-add as many columns as you need to the grid.
>-set controlsources to respective alias.fieldname and for calculated values like tot set it to:
>(table2.g1+table2.g2+table2.wm1+table2.g3)
>-set grid to readonly
>Cetin