Editing a SubForm

I have been creating a small system and as I go along I am learning things wished I’d known at the beginning. I could ditch what I have and start again or someone can point me how to do the following. Tis is all sub forms

  1. I Stupidly put the ID in the subform. Can I hide it. I can see how to hide it from the main form but not sub form.
  2. Can I move, add, delete fields/controls
  3. My subform is based upon a table. Can I change it easily enough to a query.

Duplicate of https://ask.libreoffice.org/en/question/308489/editing-a-subform/ - please delete that question and continue here

1, Right click in design mode the given column and you can hide from there

Hello,

You have answered Item #1 yourself.

-2. Can I move, add, delete fields/controls

Of course this is a misleading question. The main question is about Editing a SubForm. Fields are in a table and used in controls. Fields in a table can be moved depending upon the database being used. Generally you can add and delete fields in a table.

As for controls, you can add, move and delete controls on forms, sub forms, sub sub forms, etc. However, I am suspicious you are instead referring to a table control. While you can do much by right clicking on a column heading, copying and moving are bugs in progress - tdf#54021. If I drag and drop a column it is copied. You can then delete the original column. So it works with a bit of a struggle.

-3. My subform is based upon a table. Can I change it easily enough to a query.

Easily is relative to the experience one has. To me this is easy depending upon the sub form. What does the sub form consist of? Individual controls? Many of them? Just a table control? Table control and other control(s). Is there a sub sub form involved? Is the query expected to produce a record that is updatable in the sub form?

For a simple situation and answer - Yes.

Example situation. Sub form which uses only a table control. Delete the table control. Edit the sub form properties and on the Data tab change from a table to the query you have. Re-link main and sub form. Draw new table control on the sub form choosing what goes where.

For this and your statement:

…as I go along I am learning things wished I’d known at the beginning.

Go through the Base documentation.

Also if the link to Base documentation given to you in a past questions’ comment isn’t enough, here is a post with some more links → To learn LibreOffice Base are there introductions or tutorials?

Tis is all sub forms

Yes, but they are three different questions. Like saying they’re all regarding Base.

Please limit posts to single questions and a bit more definitive main question (although short). This is all meant for others to find answers to their questions. With multiple in one, they are buried and much more difficult to find.

Thanks for your help again. You mention re linking the main and sub form. I can’t find where/how to do that.

The main/sub form link is in the sub form properties on the Data tab. It is the Link master fields and Link slave fields entries. There is some reference & images in the Base documentation - Chapter 4 - Forms under the section Main forms and subforms.

I had those linked up already when I re read your reply as mine wasn’t working (it was returning all records) so I thought there may be something else. In the end I re did from scratch.