[Solved] Howto insert subform in existing form

Discuss the database features
Post Reply
samd052
Posts: 6
Joined: Tue Feb 09, 2010 6:45 pm

[Solved] Howto insert subform in existing form

Post by samd052 »

Hi all,
Im new to OpenOffice and im creating a database entry form. On this form im trying to insert a field or subform that would list all the entries for the current day. Ive done alot of work in MSaccess and have created subforms in MSA before. In looking for some instruction on how to "insert" a subform after the form has already been created, im finding that the advice out there is incomplete. I would like to use this thread to put together somewhat of a thorough HowTo on creating a subform in an already existing form.
I understand that a Base guide is in the works, and i look forward to it's release. Does anyone out there have a simple howto procedure for creating a subform?

Lets assume for this excersize that the form enters data into Table A, there is a separate query that reads Table A producing a result set for items entered for the current day. The subform (within the form) would show or display this query's result set (so at a glance you would know what was entered).

Regards,
Sam
:D
Last edited by Hagar Delest on Fri Feb 12, 2010 11:23 pm, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 3.1.1 on Windows
QuazzieEvil
Volunteer
Posts: 283
Joined: Tue Dec 04, 2007 6:38 pm
Location: Houston, TX

Re: Howto insert subform in existing form

Post by QuazzieEvil »

access the Form Navigator from the form design toolbar. In the navigator dialog, right-click on the form to which you want to add a sub form and select New->Form. Unlike access, you do not embed one form 'document' into another. Forms and sub forms are just two data forms within one form document that have a relationship (parent-child fields).
samd052
Posts: 6
Joined: Tue Feb 09, 2010 6:45 pm

Re: Howto insert subform in existing form

Post by samd052 »

Thanks for the reply QuazzieEvil,
So what i did in my form was go to form navigator as you suggested, added a form, then created a table field, using the table control. I set the data source to be the query i created, which i verified works. The problem is, when the whole form loads (say to start adding data), no data shows in the subform (table). The subform is to view only, no editing or changing of records take place with the subform.
Im curious as to why my query's result set does not display......any ideas?
OpenOffice 3.1.1 on Windows
QuazzieEvil
Volunteer
Posts: 283
Joined: Tue Dec 04, 2007 6:38 pm
Location: Houston, TX

Re: Howto insert subform in existing form

Post by QuazzieEvil »

have you set your master/slave fields? for the sub-form?
samd052
Posts: 6
Joined: Tue Feb 09, 2010 6:45 pm

Re: Howto insert subform in existing form

Post by samd052 »

I did not.
But what i did find is that in order to make the subform work i needed to toggle the form property "add data only" from 'yes' to 'no'. Im thinking what happened is that because i had set this parameter to "yes", the form was in data entry mode only, so my subform (which is just a query on the table) would not run. Now it's doing what i need it to do.
OpenOffice 3.1.1 on Windows
Post Reply