Hi,
I have a form which looks like this:

When creating a new event or editing an existing one, I need to make sure that the Event Name is unique from any others.
On the submit key,

I have this code, which works perfectly when adding a new event, and blocks the user from adding the user the same event name.
This also works perfectly if a user wants to change a current Event Name to another name which an Event already has.
But, this does not work when clicking edit, changing the description for example and trying to resubmit the form with the old Event Name as this name would have already been found in the table as an Event Name.
If(CountIf(Events, 'Event Name' = varEventName.Value) < 1,
SubmitForm(EditForm1),
Notify("Event Name cannot be used as it already Exists.", NotificationType.Error));
Thank you for your help.