# Is it possible to add a form/table/query from database to a sheet in calc.

Not just the text but being able to update the info, if so how?

I created a table, query and form in base; Now, I like to update and display that in my sheets in calc. Is this possible?

edit retag close merge delete

Sort by » oldest newest most voted

Hello,

Data from a database is available to all modules if the database is registered. This data is then accessible using View->Data Sources or Ctrl+Shift+F4. With this the table data and query output is available.

You cannot just bring a form from Base into Calc. You would have to create a Form in Calc itself.

As for updating the data from Calc back to Base would require specific macro coding. There is no simple solution for this.

It appears you are trying to replace Base as the front end to the database with Calc. Maybe a description of why you want to do this may provide further insight.

Edit 2018-11-05:

A few notes first. Please understand this forum is designed to ask a question and get an answer. Subsequent questions should be asked as new questions. This helps others searching for similar answers find what they need and not needing to dig through each answer for detains not posted in the question. Also, understand there is a lot to comprehend regarding Base and databases. Many new items come into play just as in Calc or Writer or other modules. It is a learning curve not accomplished overnight.

With that said, have put together a rough sample based upon your stated need. Instead of using many buttons, the form starts with a list box. The list box contains the a time period to work with. Make a selection and press the button to view/modify/enter events. There are two different versions of this - using individual fields and using a table control. Wanted to show different ways of accomplishing same thing. There are other ways and many variations.

The selection process is done using table filtering. For more information on this see this post -> Filter/Search with Forms (leveraging SubForms).

Also helpful, if you have not discovered already, is the LO Base documentation found here -> LibreOffice Base Handbook

There is no macro coding present. In most cases macros are not necessary.

more

@R den Hartigh Unfortunately watching tutorials will probably be of little help especially concerning macros. LO macros take some time to learn. In your case knowledge of both Calc and Base/database specific coding. To give you a sense of it, refer to Open Office Macros Explained by Andrew Pitonyak. PDF here ->OOME

( 2018-11-03 19:00:30 +0200 )edit

Also, it is still not clear as to why you need Calc. Seems you should be able to do all that is wanted in Base and not worry about data transfer & macros.

( 2018-11-03 19:03:07 +0200 )edit

Thanks for the response. You are right. I am trying to use calc as front end. I am creating a orchard management system. Monthly Task Calenders, Invoicing, Employees, Financial, Stock, Pricing and so on... I have everything in calc over different sheets. Life would be so much easier if I have access to a database and that the information can be accessed over multiple sheets.

I did find the registered databases and I can easily copy it into the sheet but it doesn't update if I change that. I understand that I probably need to use specific macro coding. Not that I have any clue how to but I will watch some more tutorials. Maybe you can give me a few hints or examples?

Currently I am creating a task calendar. Dropdown box with the months and every month has 31 dynamic text boxes where I can write the tasks.

more

( 2018-11-03 18:54:09 +0200 )edit

@Ratslinger Not a problem, will do! Thanks for the explanation, I have decided to continue my project in base. I am still struggling with the task calendar: I have created a standalone form. On the top 12 push buttons- January to December. Under that I created a textbox. I would like to have the text in the textbox changed when I push the related button. I have not created any tables or queries as yet because I don't know how to set this up.

( 2018-11-05 11:47:53 +0200 )edit