Standard |
Module1 |
JumpToMainform |
Basic |
class|SubForm|btnnext (Control) class|SubForm|btnnew (Control) |
25 |
Sub JumpToMainform(oEvent AS OBJECT) DIM oField AS OBJECT DIM oForm AS OBJECT DIM oDoc AS OBJECT DIM oController AS OBJECT DIM oView AS OBJECT DIM stShortcut AS STRING oField = oEvent.Source.Model stShortcut = Mid(oField.Label, InStr(oField.Label, "~") + 1, 1) oForm = oField.Parent.Parent SELECT CASE stShortcut CASE "n" oForm.MoveToInsertRow() CASE "x" IF oForm.isLast() THEN oForm.MoveToInsertRow() ELSE oForm.Next() END IF END SELECT oDoc = thisComponent oController = oDoc.getCurrentController() oView = oController.getControl(oForm.getByName(oField.Tag)) oView.setFocus End Sub |