I looked over the code you are talking about that keeps the user from adding blank records in On Form Entry mode by preventing Sesame from entering extended mode in Search/Update. This is right from the manual (version 1.1) on page 193.
I have a question that about the programming statement
NotifyForm(-2)
Why is this -2 ? The manual does not show this as a option. The options are:
NotifyForm() sets a flag on the current record to prevent or allow saving.
0 - Clear all flags, allow saving
1 - Prohibit saving
2 - Allow save, prohibit record advance
3 - Allow save, prohibit record retreat
4 - Prohibit delete record
5 - Prohibit remove record from results
6 - Disallows the tab the form is on to be closed.
Is the -2 an attempt to clear the flag? Would it not be better to set a 0 flag like this?
If @Update Then
{
If @ResultSetCurrentPosition() = @ResultSetTotal() Then
{
NotifyForm(2)
}
Else
{
NotifyForm(0)
}
}
I have tried this on my forms and it works the same as the programming in the manual as far as I can tell.