Subform does not synch with master form

Creating and using forms

Subform does not synch with master form

Postby cscj01 » Tue Aug 17, 2010 12:29 am

Ubuntu 10.04, MySQL. Openoffice 3.2

I have a form with a number of sub-forms (7 to be exact). The master form and one of the sub-forms are populated from tables. The remaining 6 sub-forms are populated from queries. All sub-forms use the same master link field, and the link field is a foreign key in all the tables used directly or referenced by queries.

The sub-form populated from a table and 2 of the sub-forms populated from queries synchronize properly on their link field. The remaining 4 do not. In fact, they are populated with a value whose link value seems to be arbitrary. In addition, the values of the 4 sub-forms that do not work correctly do not change when the master form is browsed, while the 3 that work correctly do change properly.

The definitions are all correct as far as I can tell (control values and form values; no events or filters). The queries are simple select statements, and they work properly when running them in edit mode.

This form worked until I added an additional sub-form. Then the new form and 3 others that had worked correctly quit doing so. The only difference I can detect between the 2 that synchronize correctly and the 4 that do not is that when I right click on the sub-forms (using the Form Navigator) and choose Properties and the Data tab, the ones that work correctly will pop up both the Filter and the Sort windows when I choose the ... button, but the 4 that do not work properly do nothing when I choose the Filter or Sort ... button.

I have tried deleting the offending sub-forms and adding them back. Nothing changes when I do this. I am not sure what to check next. Any help will be greatly appreciated.
cscj01
 
Posts: 32
Joined: Wed Apr 02, 2008 12:45 am

Re: Subform does not synch with master form

Postby Villeroy » Tue Aug 17, 2010 1:04 am

Direct SQL queries may cause this effect.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26142
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Subform does not synch with master form

Postby cscj01 » Tue Aug 17, 2010 1:24 am

Villeroy wrote:Direct SQL queries may cause this effect.


By this I presume you are referring to the fact that I have queries set up and use a Content type of "Query". If so, why do 2 work and 4 not? Is it arbitrary whether or not this will occur?

My tables are person, address, telephone, and email address. Person_ID is the primary key of person, and appears in the other tables as a foreign key. I use a form for each type of telephone (home, work, cell, and fax) and for a primary and secondary email address. The query for home telephone is "select t.number, t.person_id from telephone t where t.type = 'H'. Of course, I use proper qualifiers. The other queries are similar.
cscj01
 
Posts: 32
Joined: Wed Apr 02, 2008 12:45 am

Re: Subform does not synch with master form

Postby cscj01 » Mon May 21, 2012 11:08 pm

I am now on Ubuntu 11.10 and LO 3.4.4. I was finally able to resolve this issue by creating views for each type in the respective tables, telephone and email. I also had to set the "Analyse SQL command" to Yes. I started working on this again today after almost 2 years. Who knew?.
cscj01
 
Posts: 32
Joined: Wed Apr 02, 2008 12:45 am

Re: Subform does not synch with master form

Postby yaiban » Fri Jun 29, 2012 1:49 pm

Thank you for posting your found solution here. Also, congratulations :). Please add [Solved] to the title. A bit sad that nobody could provide you help :/
Apache OpenOffice 3.4.1 on Linux Mint 14
yaiban
 
Posts: 59
Joined: Fri Jun 15, 2012 8:35 am

Re: Subform does not synch with master form

Postby Villeroy » Fri Jun 29, 2012 3:06 pm

yaiban wrote:Thank you for posting your found solution here. Also, congratulations :). Please add [Solved] to the title. A bit sad that nobody could provide you help :/

My answer was correct. Anybody using Base should know what direct SQL is and what "parsed mode". Searching for "direct SQL" in the F1 help gives a hint. Searching this forum for "direct SQL" gives too many results. Searching in the Base tutorial section only gives very informative results. In MS Access the same thing is named "pass-through query".

Form property "Analyse SQL command"=No is equivalent to "menu:Edit>Run SQL directly" in the query editor.
Therefore
form property "Analyse SQL command"=Yes is equivalent to "menu:Edit>Run SQL directly"=No in the editor.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26142
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Forms

Who is online

Users browsing this forum: No registered users and 2 guests