To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=99308
------- Additional comments from [email protected] Thu Aug 27 18:29:45 +0000 2009 ------- This problem can be solved by following macro: Sub ComputeInsideForm dim oForm as object dim oShape as object dim Controller as object dim oControl as object dim sName as string dim vA as integer, i as integer oForm = ThisComponent.getDrawPage() oController = ThisComponent.getCurrentController() For i = 0 To oForm.getCount() - 1 oShape = oForm.getByIndex(i) sName = oShape.control.name select case sName case "Af" oShape = oForm.getByIndex(i) oControl = oController.getControl(oShape.control) vA = oShape.control.value case "Bf" oShape = oForm.getByIndex(i) oControl = oController.getControl(oShape.control) oControl.value = vA * 2 case "Cf" oShape = oForm.getByIndex(i) oControl = oController.getControl(oShape.control) oControl.text = "Hallo" end select next end sub The connected table contained three columns: A,B as integer and C as text. The form connected with this table contained two number fields Af,Bf and text field Cf, which are connected respectively with columns A,B,C and one push button COMPUTE for starting the macro. The requested action after inputting a number into the field Af and pushing button, the computed value should be describing in field Bf, and „Hallo“ in the text field Cf. After using the icons „Save record“ or „New record“ all three values should be saved into the table. Macro ComputeInsideForm realized this action only if next two conditions are fulfilled: 1.The form has been created in the design mode. If the wizard has been used for creating the form, then the error message „The feature or the method was not fint“ is described for the statement sName = oShape.control.name. 2.The macro is running step by step using icon „Step inside“. If the macro is started by button then the computed value from the field Bf will not be saved into the table. The both conditions are errors in OOo Base application and the second one foils using this macro for a programme. Bye Unsatisfied --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
