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+unsubscr...@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