I've written the below code wrong and am getting this error. "Ambiguous name detected".
The field names are all correct so I'm sure it has something to do with how it is written. I'm wanting to check each date to make sure they are put in properly.
Please let me know where I went wrong.
Private Sub OK_Click()
If Me.FYDate < Me.FirstDay Then
MsgBox "The FY Date cannot be before the Fist Date", 0, "Error"
Me.FYDate = Null
Me.FYDate.SetFocus
Exit Sub
End If
Me.Visible = False
End Sub
Private Sub OK_Click()
If Me.FirstDay < Me.SeventhDay Then
MsgBox "The First Date cannot be before the Seventh Date", 0, "Error"
Me.FirstDay = Null
Me.FirstDay.SetFocus
Exit Sub
End If
Me.Visible = False
End Sub
Private Sub OK_Click()
If Me.SeventhDay < Me.FourteenthDay Then
MsgBox "The Seventh Date cannot be before the Fourteenth Date", 0, "Error"
Me.SeventhDay = Null
Me.SeventhDay.SetFocus
Exit Sub
End If
Me.Visible = False
End Sub