The following onNavigate event handler calls a custom form method called refreshUnlinked( ), which has the job of updating any controls that are not dataLinked to the rowset. It also displays a message if the end-of-set has been reached.

function Rowset_onNavigate()

   if this.endOfSet 

      msgbox("No more entries", "Alert", 48)  

   else 

      this.parent.parent.refreshUnlinked() 

   endif 

In most applications, when navigating to the end-of-set the row cursor is always put back to the previous valid row. Therefore, the message displayed here will appear when the row cursor is on the end-of-set. Once the dialog box is dismissed, the row cursor will be moved back. There is no reason to call refreshUnlinked( ) when at end-of-set either, because the navigation that follows will cause the method to be called again.