Hi, another problem I see:
In a form assigned to table CUSTOMER I have a listbox linked to CUSTOMER.COUNTRY_ID, where the country of a customer is selectable:
"SELECT `SHORTNAME`, `ID` FROM `ssdb01`.`COUNTRY` ORDER BY `SHORTNAME` ;", datafiled is COUNTRY_ID.
Now, when I go to a certain customer and change the cointry, or add a new one, the COUNTRY_ID field is always set in the first record (the first row). That might -- just thinking about -- be related to the second part problem I reported in my other post today (http://user.services.openoffice.org/en/ ... =39&t=5259) where the display of record fields was not updated when moving to next/previous records using a button control.
However, that problem there I saw in another table of the same DB.
My platform:
OO2.4
Linux x86 (RHEL4 based)
MySQL via JDBC
All valuable statements are highly appreciated.
Uwe
[Solved] Form targets the wrong table record
[Solved] Form targets the wrong table record
Last edited by ufalke on Wed Apr 30, 2008 9:47 am, edited 1 time in total.
Re: Form targets the wrong table record
An update to this thread:
I supposed in the original post, that the problem might be related to another one (described in http://user.services.openoffice.org/en/ ... =39&t=5259) where I reported that buttons with the functions "Next Record" and "Previous.Record" assigned did not work, and later I added that the controls in the navigation bar of the form would work until I use the control buttons of the form.
However, for the problem described here, this is not an alternative: the data are written to the first record always,regardless if I navigate to the desired target record by the control buttons or by the navigation bar controls.
I supposed in the original post, that the problem might be related to another one (described in http://user.services.openoffice.org/en/ ... =39&t=5259) where I reported that buttons with the functions "Next Record" and "Previous.Record" assigned did not work, and later I added that the controls in the navigation bar of the form would work until I use the control buttons of the form.
However, for the problem described here, this is not an alternative: the data are written to the first record always,regardless if I navigate to the desired target record by the control buttons or by the navigation bar controls.
Re: Form targets the wrong table record
Found the problem:
somehow, two main forms had been created in that form, at least the form navigator showed two m.f.s in the tree display (how did that come? I don't know, I am surprised that one can create two forms in one, or is it so that a "form" is just a container for one or several "main forms" which again may contain one or several "sub forms"?
Nevertheless, after recreating the listbox on the proper main form (and deleting the other one), all is fine.
Still I see it as a design problem. IMHO, the creation of several main forms in a form should be prevented (what do we have subforms for?).
Thanks to all who already started thinking
Uwe
somehow, two main forms had been created in that form, at least the form navigator showed two m.f.s in the tree display (how did that come? I don't know, I am surprised that one can create two forms in one, or is it so that a "form" is just a container for one or several "main forms" which again may contain one or several "sub forms"?
Nevertheless, after recreating the listbox on the proper main form (and deleting the other one), all is fine.
Still I see it as a design problem. IMHO, the creation of several main forms in a form should be prevented (what do we have subforms for?).
Thanks to all who already started thinking
Uwe