[Solved] Macro to display SQL result in Calc
Posted: Thu Apr 27, 2017 9:47 am
Hi there,
I think this one shouldn't be so difficult to solve, but I am total beginner.
I have currently a database connected to Calc and it works just fine. I have the database registered and I use the link between them. Now I have created simple sql query:
The query works just like I want, I have to enter "ID" to display display the result I wish. The problém is, that when I link the query into Calc (Using F4 for data sources), the dialog box to enter ID opens up, I fill the ID in and the results is displayed, but I refresh the whole spreadsheet a lot (using macro controled by button) and every time I refresh the spreadsheet, the dialog box to enter ID opens up again. Simply, my goal is to have a button, which would trigger the SQL query only by clicking it to display the result in a specifie Calc cell range.
Is is possible? Thank you very much in advance
I think this one shouldn't be so difficult to solve, but I am total beginner.
I have currently a database connected to Calc and it works just fine. I have the database registered and I use the link between them. Now I have created simple sql query:
Code: Select all
SELECT * FROM "table" WHERE "ID" = ?
Is is possible? Thank you very much in advance