OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Cannot insert new records in forms

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
sambalpedas
General User
General User


Joined: 04 Sep 2008
Posts: 5

PostPosted: Thu Sep 04, 2008 1:12 pm    Post subject: Cannot insert new records in forms Reply with quote

I am trying to get to work my first database with base using the HSQL engine and now I get this problem:

I have created my first tables and queries and now I am working on the first form. I can see there the records which I have inserted in the tables, but I cannot create any new records. The button for new records is faded out, even though the functions "allow additions, modifications and deletions"are all on "yes".

I can browse through my previous records without problems and I can create new records in the tables.

What could be my problem?

Thanks in advance for your help
sambalpedas
Back to top
View user's profile Send private message
Voobase
OOo Advocate
OOo Advocate


Joined: 21 Nov 2007
Posts: 400
Location: Australia

PostPosted: Sat Sep 06, 2008 6:16 am    Post subject: Reply with quote

Hi there,

In Base, if you use a query as a datasource for your form it becomes read only. The form must use a table as its data source.

You can create subforms as well as mainforms and create joins between the two so that they act a bit like a query. You can join a table based subform to a query based mainform but only changing of the data would be allowed in the subform.

If it wasn't this please let us/me know.

Cheers

Voo
Back to top
View user's profile Send private message
sambalpedas
General User
General User


Joined: 04 Sep 2008
Posts: 5

PostPosted: Sun Sep 07, 2008 12:41 am    Post subject: Reply with quote

Thanks for your answer.

Yes, I did use a query as base for the form. But I don't think, this is the problem. I have tried to make a form from a query using the wizard and it works. But I could not find out, what makes the difference between these two forms. Why does one work and the other one doesn't.

Any other ideas?

sambalpedas
Back to top
View user's profile Send private message
Wandering
OOo Enthusiast
OOo Enthusiast


Joined: 18 Oct 2007
Posts: 190

PostPosted: Sun Sep 07, 2008 11:59 am    Post subject: Reply with quote

The contents of a query may not define a specific record in all linked databases. It could for instance show one company name with fifty employee names. When changing the form, Base would have no way to know which of the records to modify, or if it would be safe to modify any of them.

The query should contain the key fields for each table, and should define only one record from each. Then you can modify from the form. At least that's as far as I got.

Good luck!
Back to top
View user's profile Send private message
sambalpedas
General User
General User


Joined: 04 Sep 2008
Posts: 5

PostPosted: Mon Sep 08, 2008 1:34 am    Post subject: Reply with quote

This might point in the right direction. I still have to think about it to fully understand.

Thanks
sambalpedas
Back to top
View user's profile Send private message
sambalpedas
General User
General User


Joined: 04 Sep 2008
Posts: 5

PostPosted: Mon Sep 08, 2008 12:20 pm    Post subject: Reply with quote

Yes, I do use data from two related tables which I link in a query. One table has products and the other one colors.
I want to use the form to enter new products and one of the fields in the form is a combo-box, where I want to choose an existing color or add a new one.
The existing records are shown correctly, but I can't ad new ones.

I still don't see what is wrong.

sambalpedas
Back to top
View user's profile Send private message
sambalpedas
General User
General User


Joined: 04 Sep 2008
Posts: 5

PostPosted: Sun Nov 09, 2008 1:30 pm    Post subject: Reply with quote

Voobase wrote:

In Base, if you use a query as a datasource for your form it becomes read only.


After a lot of trying, I get to the conclusion, that most probably this statement was right and my book (which is otherwise very good) is wrong on that point.

Now I am trying to work with tables, what makes it more difficult to avoid redundancies in the forms, but it seems to be the only solution.

Thanks
sambalpedas
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group