I'm trying to write code to prevent overlapping periods a manager is assigned to a project.
Here's the code:
If Me!EndDate <= Forms!frmManager!EndDate And _
Me!EndDate >= Forms!frmManager!StartDate Then _ MsgBox "The start date is included in a previous manager's period.", vbInformation,
Me.Caption
Cancel = True
Me!EndDate.SetFocus
Exit Sub
End If
End Sub
The error message I keep getting is something like "cannot find form frmManager referred to in macro or visual code"
Any help would be greatly appreciated.
Here's the code:
If Me!EndDate <= Forms!frmManager!EndDate And _
Me!EndDate >= Forms!frmManager!StartDate Then _ MsgBox "The start date is included in a previous manager's period.", vbInformation,
Me.Caption
Cancel = True
Me!EndDate.SetFocus
Exit Sub
End If
End Sub
The error message I keep getting is something like "cannot find form frmManager referred to in macro or visual code"
Any help would be greatly appreciated.