Date: prev next · Thread: first prev next last
2024 Archives by date, by thread · List index


Hi Edwin,

Is it possible to open to put a button in a form to open a different form from a linked field?

One possibility:
Create a table "tbl_Filter". Might be you are already using such a table for only one row. This table should contain a field like "Plant_ID". So you could save the identifier for the plant in this table.
Open the new form, which depends on a query like this:

SELECT * FROM "MyTable" WHERE "ID" = (SELECT "Plant_ID" FROM "tbl_Filter")

Might be a macro like this helps:

SUB OpenFormPlant(oEvent AS OBJECT)
   oForm = oEvent.Source.Model.Parent
   IF hasUnoInterfaces(oForm, "com.sun.star.form.XForm" ) THEN
      stID = oForm.getString(oForm.FindColumn("ID"))                  
      oConnection = oForm.activeConnection()
      oSQL_Statement = oConnection.createStatement()
      stSql = "UPDATE ""tbl_Filter"" SET ""Plant_ID"" = '"+stID+"'"
oSQL_Statement.executeUpdate(stSql) ThisDatabaseDocument.FormDocuments.getByName("frm_PropagatingPlant").open
   END IF       
END SUB

Regards

Robert
--
Homepage: https://www.familiegrosskopf.de/robert


--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.