Open entry in form

Hello,
so I have my testing database of people:

From that database I created query to show only relevant columns:

For editing people I created form:


Now my question:
After I find some person using the created Query, how can I open it in the form to edit it comfortably?

I would expect "Right click → Open in form-person" or something in the query result.

Thank you for advice.

Hello,

I believe you have some misconceptions about what is needed to update records. Let’s just use your images.

In your table you have four fields: id, name, surname and note. Of note is the Key field here - id. The is a unique key which allows access to the record.

In the Query, you select all fields EXCEPT the most important one - the Key field id.

Now when you get to the form you have no way of actually accessing the actual table record which requires a Key field. Instead you simply have a list of information gathered from the table through a query.

If you were to add the id field to the query & the form it would work but makes no sense since it is just a duplicate of the table itself. However, when creating new records or updating/modifying existing records you typically need the entire record present to fulfill the fields in the record.

With all that, if you simply want to select a record based upon a piece of information, you can do that with a list box and a table filter. There is a sample in my answer on this post display specific record in a form which demonstrates this & in the same answer another link to more info on filtering.

Here is a more complex sample which includes a sub form and optional for not using filter but rather a macro Macro wich auto fill form #BASE.

You may also be interested in the Base documentation found here - LibreOffice Documentation/Publications

If this answers your question please tick the :heavy_check_mark: (upper left area of answer). It helps others to know there was an accepted answer.

Thank you for the answer. But your sample doesn’t do what I need:

  1. I opened “EMPLOYEES” table.
  2. I selected entry with ID 5 and then clicked to “Edit data” button.
  3. No form was open. Just inline edit.

I need an easy way how to list data, and from that list open editing form for one selected entry.

@nanuqcz You did not open a form. You opened a table. There is no method to open a form from a table list. Look in the Forms section of that .odb file. Open the CompanySelectionNoMacro form. Use the list box to select the company wanted. Press the button & that company record appears where you can edit it. This is a more complex form. Once the company is selected, it also lists the employees on for the company on the grid below. You can edit them in the grid.

If you do not understand these methods, please read some of the documentation pointed to. Look especially near the top for the Getting started with Base document. It will present a better overall process of Forms & tables.

You may be better off looking at the first example I pointed to as it is more basic.