Im sorry for double posting...but i think this is the wright place for this question.
Hey,
I have a main form (frmMain) and two subforms (frmSub1 & frmEditRecords). Both subforms are in datasheet view. In frmSub1 I write this code under ON Current event:
If Right(Me.ZapSt, 3) = "000" Then
Forms!frmMain.Form!frmEditRecords.Form.RecordSourc e = "QryOPR"
Else
Forms!frmMain.Form!frmEditRecords.Form.RecordSourc e = "QryOPRDod"
End If
So if last 3 letters of field "ZapSt" are "000" then recordsource of form "frmEditRecords" is query "QryOPR" else "QryOPRDod". For now everithink works just fine, but now i have a problem. Becouse when i cant to edit the data in form "frmEditRecords" and i try to click on "frmEditRecords" records form "frmSub1" jumps to record 1 and becouse of the On Current event change the recordset and records of form "frmEditRecords"! I hope youll understad what i mean
So does anyone know how to prevent that? So i will be able to editrecords the way i want?
THX, S
Hey,
I have a main form (frmMain) and two subforms (frmSub1 & frmEditRecords). Both subforms are in datasheet view. In frmSub1 I write this code under ON Current event:
If Right(Me.ZapSt, 3) = "000" Then
Forms!frmMain.Form!frmEditRecords.Form.RecordSourc e = "QryOPR"
Else
Forms!frmMain.Form!frmEditRecords.Form.RecordSourc e = "QryOPRDod"
End If
So if last 3 letters of field "ZapSt" are "000" then recordsource of form "frmEditRecords" is query "QryOPR" else "QryOPRDod". For now everithink works just fine, but now i have a problem. Becouse when i cant to edit the data in form "frmEditRecords" and i try to click on "frmEditRecords" records form "frmSub1" jumps to record 1 and becouse of the On Current event change the recordset and records of form "frmEditRecords"! I hope youll understad what i mean
So does anyone know how to prevent that? So i will be able to editrecords the way i want?
THX, S