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

Entering data into a table control subform

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


Joined: 25 Mar 2006
Posts: 10
Location: West Chester, PA

PostPosted: Sat Mar 25, 2006 9:22 pm    Post subject: Entering data into a table control subform Reply with quote

My current project in part involves something akin to a recipe list. For this I have 3 relavent tables. An Ingredients table, a main recipe table, and a recipe ingredients table (so I can have a variable amount of ingredients for each recipe). I've created the form and it works well for looking at currently-entered recipes. Basically the form is based off the main recipe table (name, ID, etc.). It has a sub-form with a table entry for recipe ingredients (PrimaryKey, RecipeID, Ingredients). The RecipeID is the link to the ID field of the main recipe table. In the table entry I have the Ingredients set up as a list entry pulling names from the Ingredients table.

With recipes that are entered, I see in the table entry area all the ingredients that I had entered for the recipe. But, when I try to enter in a new recipe I have to do it in two steps because when I enter data to the main form area, I can't create new lines in the table entry area (tabbing there gives me NO cursor, but I can tab back out). Leaving the main record and then returning to it I can then enter Ingredients.

If I haven't confused everyone, how can entry of a new recipe be entered with one step?

I'm using OOoBase 2.0.2 and my database is the intermal HSQL format.
Back to top
View user's profile Send private message AIM Address
DrewJensen
Super User
Super User


Joined: 06 Jul 2005
Posts: 2616
Location: Cumberland, MD

PostPosted: Sun Mar 26, 2006 4:53 am    Post subject: Reply with quote

No confusion..it is a pain.

The way to fix is it is with a small macro that you assign to the Record Action event for the Main form. When the macro is called for a insert record event, simply reload the sub_form.

Here is an example
http://www.oooforum.org/forum/viewtopic.phtml?t=29126&start=0&postdays=0&postorder=asc&highlight=update+subform
_________________
Blog - http://baseanswers.spaces.live.com/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Sembazuru
General User
General User


Joined: 25 Mar 2006
Posts: 10
Location: West Chester, PA

PostPosted: Sun Mar 26, 2006 8:40 pm    Post subject: Reply with quote

Well, that seemed to sort it out mostly. Thanx for the link. (I had done a search, but must not have used the correct search terms.)

The only problem now I can't tab out of the sub form. Not a big deal, just a hassle to have to use the new-record button on the navigator bar.
Back to top
View user's profile Send private message AIM Address
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