Is there anyway to open a form and have the WHERE condition change based on which subform the user was on? I currently do this with 3 different codes, and 3 different buttons, but i'd like to just have one. The only thing that's changing in the WHERE condition is the subform name.
Private Sub cmdEdit_Click()
DoCmd.OpenForm "frmEdit", acNormal, "", "[Task_ID]=[Forms]![frmTask_List]!
[I NEED THIS PART TO CHANGE BASED ON WHICH SUBFORM THE USER WAS ON].[Form]![Task_ID]", , acNormal
End Sub
Private Sub cmdEdit_Click()
DoCmd.OpenForm "frmEdit", acNormal, "", "[Task_ID]=[Forms]![frmTask_List]!
[I NEED THIS PART TO CHANGE BASED ON WHICH SUBFORM THE USER WAS ON].[Form]![Task_ID]", , acNormal
End Sub
Comment