obfusc88 wrote on May 29
th, 2007 at 12:36am:
...where do i find FormNotifyForm in the manuals?
It's not in the manuals, since it was added to Sesame after the manuals were printed. You can find FormNotifyForm documented here:
http://www.lantica.com/Support/sesame_change_log.htmlIt's under the section titled
Version: 1.1.3 Quote:The first thing that i found out was that i had to put quotes around the form name to meake it work.
You would need the quotes if you use the name of the form, but you would NOT use the quotes if you are using a variable to represent the form's name.
For example, if you want to use a variable, and the name of your main form is
Checkbook, you could use the following code in the Global Code programming event. And then you would use the 1st code example I posted, exactly as it appears.
stat sThisFormName as string = "Checkbook"
Or you could modify the code by replacing
sThisFormName, with
"Checkbook" like the following code. (Of course, you would use the name of your main form in place of
Checkbook.)
If @Update
{
If @FormResultSetCurrentPosition("Checkbook") = @FormResultSetTotal("Checkbook")
FormNotifyForm("Checkbook", 2)
Else
FormNotifyForm("Checkbook", -2)
}
Quote:I am using subforms so i put the same programming in FormEntry sections on top form and the subform.
I wouldn't recommend using the code in a subform.
Quote:This is what I ended up with
If@Update {
If @FormResultSetCurrentPosition("sThisFormName") = @FormResultSetTotal("sThisFormName")
NotifyForm(2)
Else
NotifyForm(-2)
}
Unless your main form is really named
sThisFormName, that's not correct.
Quote:Also now when I press F10 in updateing mode, the record numbers on top of window flash count but come back to last record. Is that flashing the trouble you warned about?
I do see the flashing sometimes, too. It's normal.