I created a form with subform in the wizard, for a MySQL database via ODBC. There was already a relationship between the tables. When I used the form I couldn't add or change any records in the subform.
I figured maybe it was because of something in MySql so I tried creating a Base document in the native database format and had the same result. What am I doing wrong? This is in OO 3.
Can't change or add records in subform?
- peterdines
- Posts: 42
- Joined: Thu Nov 06, 2008 9:06 am
Can't change or add records in subform?
OOo 3.3 / Mysql / Postgres / OS X 10.6.5
Re: Can't change or add records in subform?
When you say you "can't add or change records", what exactly do you mean? Was there an error message?
Best wishes,
Tim.
Best wishes,
Tim.
OOo 3.0.X on MS Windows Vista + Ubuntu
- peterdines
- Posts: 42
- Joined: Thu Nov 06, 2008 9:06 am
Re: Can't change or add records in subform?
Nothing in the subform table is editable. The new record button is grayed out. I can see data if it's there, but I can't add or change e.g. invoice line items. In the form wizard I chose "arrangement of the subform" as "data sheet".
OOo 3.3 / Mysql / Postgres / OS X 10.6.5
Re: Can't change or add records in subform?
In the list of forms, try right-clicking on the form and selecting Edit.
Then right-click on the subform and select Form. Click on the data tab.
There are three entries: Allow additions, Allow modifications, Allow deletions. Are these all Yes?
If that doesn't help, you could check that each column in the grid has Read-only set to No.
I hope that helps.
Best wishes,
Tim.
Then right-click on the subform and select Form. Click on the data tab.
There are three entries: Allow additions, Allow modifications, Allow deletions. Are these all Yes?
If that doesn't help, you could check that each column in the grid has Read-only set to No.
I hope that helps.
Best wishes,
Tim.
OOo 3.0.X on MS Windows Vista + Ubuntu
- peterdines
- Posts: 42
- Joined: Thu Nov 06, 2008 9:06 am
Re: Can't change or add records in subform?
Thanks for the replies - all the settings look correct - does anyone have an example of a Base database form with a working subform? Maybe I need to see a working one to use as a model.
OOo 3.3 / Mysql / Postgres / OS X 10.6.5
Re: Can't change or add records in subform?
Is the subform based on a table or a query? Does the subform table include a primary key?
kabing
kabing
NeoOffice 2022.7 LibreOffice 24.8.4 on (Intel) Mac OS Ventura
- peterdines
- Posts: 42
- Joined: Thu Nov 06, 2008 9:06 am
Re: Can't change or add records in subform?
Months later I had time to come back to Base development - problem was indeed no primary key in the subform. You are correct, sir!
OOo 3.3 / Mysql / Postgres / OS X 10.6.5
Re: Can't change or add records in subform?
I'm glad you found an answer, but I'm not a "sir." No way for you to know that, of course.
kabing
kabing
NeoOffice 2022.7 LibreOffice 24.8.4 on (Intel) Mac OS Ventura