What are the differences between forms in Base and forms in Writer?

Hi guys

Can someone please clarify the functional and technical names/differences for the forms that you have in base and the forms and subforms you have in writer.

I’m writing macros for a base frontend form but I realised that if I have a subform in the form in writer I end up with at least three different names/forms. From what I can tell only the base forms are in the forms collection. But why are they all called forms if they appear to refer to different functional uses?

  1. In base I have a form with a name
  2. In writer, if I go in design mode I can modify form properties. This form has a different name from the base form. But as far as I understand it’s still called a form
  3. Additional sub forms have the same properties as number 2.

Are these forms all the same objects? If so, why is form 1 and form 2 not the same?

Ok, I just noticed that the Error #1507 happens when the writer main form and and base form are not named the same. So I guess they are more or less the same object. The error message wasnt that clear but I guess it’s trying to say it: “Form formname not identified in database Form set”

My final note on this: (source Access2Base - It's about converting PEOPLE, not data)
allforms will return all forms of the db
forms will return all OPEN forms.

A subform is firstly a control of the parent form. So if FRM2 is a subform of FRM1. Then to access the controls of FRM2, you have to: allforms(“FRM1”).controls(“FRM2”).form.controls
So even though FRM2 is firstly a control, you have to get the .form of it to access it’s controls

Hello,
I’ll try to help you further.

A Base document may contain 1 or more forms.
A Writer document may contain 1 or more forms.
Even if a Writer form (= shortcut for “a form located in a Writer document”) might be derived by “Save As” from a Base form (= shortcut for “… Base …”), a Writer form and a Base form are totally independent items.

Note that Access2Base has currently next limitation: it does not support more than 1 form in a Writer document. This limitation will disappear with the coming release (1.1.0) included in LO 4.3.

The AllForms() and Forms() collections, referring respectively to all the forms or to all the open forms of a document never merge the forms of a Base document with that of a Writer document. They list the forms of the document where the macro is started from. You cannot refer to a Base form from a macro run from a Writer document.

Finally I confirm that accessing a control stored in a subform from a (main)form requires to use the Form property applied on the subform control to reach the Controls collection of the subform, like in

   Forms("myForm").Controls("mySubform").Form.Controls(mySubControl")

Let me know if you have more questions.
JPL