Hi Harvey,

why do you want to use Access2Base?

Here a code from German Base Handbuch:

SUB ChangeData(oEvent AS OBJECT)
 DIM oConnection AS OBJECT
 DIM oForm AS OBJECT
 DIM stSql AS STRING
 DIM oSql_Statement AS OBJECT
 DIM inValue AS INTEGER
 oForm = oEvent.Source.Model.Parent
 oConnection = oForm.activeConnection()
 stSQL = oForm.getString(oForm.findColumn("SQL-Code"))
 inValue = MsgBox("Should SQL-Code" & CHR(13) & stSQL & CHR(13) &
"be executed?", 20, "Execute SQL-Code")
 IF inValue = 6 THEN
 oSQL_Statement = oConnection.createStatement()
 oSQL_Statement.execute(stSql)
 END IF
END SUB

SQL-Code is part of a table. Field in the table is "SQL-Code". Table is datasource of a form. A button in this form will be enough to execute the macro. You coud update, insert or delete rows by command "execute".

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

Reply via email to