Just to confirm the correct form structure
1) Main Form "Job_Edit"
2) Subform "Job_Edit_JobTask_List (contains a look-up for all the tasks in the table zmtTasks). It is a continuous form. Each record also has a check box which has an onclick event. This onclick event as follows:
Private Sub chkEdit_Click()
Dim sWhere$
Me.chkEdit = False
DoCmd.RunCommand acCmdSaveRecord
Me.RecordsetClone.Bookmark = Me.Bookmark
sWhere$ = "JobTaskID = " & Me.RecordsetClone("JobTaskID")
DoCmd.OpenForm "JobTask_Edit", , , sWhere$, , acDialog, Me.Parent.Name
End Sub
This opens the following form
3) JobTask_Edit. This has a subform
4) subform JobTask_Edit_JobSubTask_List. This is similar to form 2 (above) but looks up a list of subtasks from the table zmtSubTask.
And so the question. Every Task in Form 2, should have a least one subtask connected to it in form 4. If not, I want it to be impossible to close Form 1 and for a message to pop up and say why!
I hope you understand!!
I should be clear that the above database was developed by a another. I am learning by leaps and bounds but I could not have developed the above layout. I say that my abilities are not overestimated for any replies. I need a fairly clear blow by blow explanation how to do that complete with code examples if that is not too much to ask.
Thanks
1) Main Form "Job_Edit"
2) Subform "Job_Edit_JobTask_List (contains a look-up for all the tasks in the table zmtTasks). It is a continuous form. Each record also has a check box which has an onclick event. This onclick event as follows:
Private Sub chkEdit_Click()
Dim sWhere$
Me.chkEdit = False
DoCmd.RunCommand acCmdSaveRecord
Me.RecordsetClone.Bookmark = Me.Bookmark
sWhere$ = "JobTaskID = " & Me.RecordsetClone("JobTaskID")
DoCmd.OpenForm "JobTask_Edit", , , sWhere$, , acDialog, Me.Parent.Name
End Sub
This opens the following form
3) JobTask_Edit. This has a subform
4) subform JobTask_Edit_JobSubTask_List. This is similar to form 2 (above) but looks up a list of subtasks from the table zmtSubTask.
And so the question. Every Task in Form 2, should have a least one subtask connected to it in form 4. If not, I want it to be impossible to close Form 1 and for a message to pop up and say why!
I hope you understand!!
I should be clear that the above database was developed by a another. I am learning by leaps and bounds but I could not have developed the above layout. I say that my abilities are not overestimated for any replies. I need a fairly clear blow by blow explanation how to do that complete with code examples if that is not too much to ask.
Thanks