I want to copy value from Form to subform (master filed and child field is "ID_DTP/CTP"). The problem is, that subform (Datasheet) has many rows and Ms Access with my last code past value only to first row. So I thought that there's should be loop, but I never use loop before. Now when I click button, Ms Access crashes:/
Form "frmDTP/CTP"
Subform "frm_cyfra"
value which I want to copy - from me.imie to Forms![frmDTP/CTP].Form!frm_cyfra!Id_pracownicy
What did I wrong?
Form "frmDTP/CTP"
Subform "frm_cyfra"
value which I want to copy - from me.imie to Forms![frmDTP/CTP].Form!frm_cyfra!Id_pracownicy
Code:
If Not Len(Nz(Forms![frmdtp/ctp].Form!frm_cyfra!ID_cyfra)) = 0 Then
Do
Forms![frmdtp/ctp].Form!frm_cyfra!Id_Pracownicy = Me!Imie
Loop Until Forms![frmdtp/ctp].Form!frm_cyfra![ID_DTP/CTP] <> Me![ID_DTP/CTP]
End If
What did I wrong?