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

creating subforms

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


Joined: 17 May 2010
Posts: 4

PostPosted: Mon May 17, 2010 6:12 am    Post subject: creating subforms Reply with quote

Hey people,

I'm new to openoffice but not databases. I'm proper stuck on subforms. I'm currently working on a database to record my bodybuilding exercises.

Heres my table structure:

tblWorkout
Workout_ID - Integer - primary key
Date - date
Current Weight - integer

tblExercise
Exercise_ID - integer - primary key
Exercise - text
Workout_ID - integer - foreign key

tblSets
Sets_ID - integer - primary key
Sets - integer
Workout_ID - integer - foreign key

tblReps
Reps_ID - integer - primary key
Reps - integer
Workout_ID - integer - foreign key

tblSetWeight
SetWeight_ID - integer - primary key
SetWeight - integer
Workout_ID - integer - foreign key

Relationships:



So the form i want to make will have a main form containing the tblWorkout Fields, and have a subform in datasheet view containing these fields: exercise, sets, reps, and setweight, however i want the fields to be like list boxs so i can select the data for that session.

So i go to the wizard and select the first table, but then when i go to make the subform i can only select one table at a time, and therefore am getting stuck with how to get the other fields into my database.

I'm proper lost with what is wrong, any help would be amazing!

Thanks[/img]
Back to top
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Mon May 17, 2010 7:57 am    Post subject: Reply with quote

Hello


I think his link can help you.
http://user.services.openoffice.org/en/forum/viewtopic.php?f=83&t=28235

Romke
Back to top
View user's profile Send private message
nickt1988
Newbie
Newbie


Joined: 17 May 2010
Posts: 4

PostPosted: Mon May 17, 2010 10:03 am    Post subject: Reply with quote

So i've had a look at that post and created a subform which is pointed to the same as the main form and then in the subform i have created more subforms for the different tables.

Picture so this makes sense:



So now my form looks like this:



the problem now is that the Exercise form saves whats selected but the other three don't save.

The master and slave fields for all the sub-subforms is Workout_ID.

Any ideas on what i've done wrong?
Back to top
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Mon May 17, 2010 12:11 pm    Post subject: Reply with quote

Hello

I think the most important error you make is: It seemes that you have the idea that a subform is a graphical idea andt hat is not true.

Make a subform with the wirzards and sea what it is.

Romke
Back to top
View user's profile Send private message
nickt1988
Newbie
Newbie


Joined: 17 May 2010
Posts: 4

PostPosted: Mon May 17, 2010 1:00 pm    Post subject: Reply with quote

help me out then
Back to top
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Mon May 17, 2010 1:06 pm    Post subject: Reply with quote

No
Back to top
View user's profile Send private message
nickt1988
Newbie
Newbie


Joined: 17 May 2010
Posts: 4

PostPosted: Mon May 17, 2010 1:22 pm    Post subject: Reply with quote

prick
Back to top
View user's profile Send private message
keme
Moderator
Moderator


Joined: 30 Aug 2004
Posts: 2910
Location: Egersund, Norway

PostPosted: Mon May 17, 2010 1:48 pm    Post subject: Reply with quote

nickt1988 wrote:
prick
Refrain from name calling, and instead make use of the link provided. It really is helpful.

The forum thread has a section about creating main-/subforms. Read the entire thread, and bear in mind the two "form concepts" mentioned: the graphical form as a set of fields laid out on screen, and the logical form (consisting of the set of form fields connected to the main table fields) and subform(s) (set(s) of form fields connected to dependent table fields). The logical main form and subforms are all contained within one graphical form document.

Once you master those concepts, find your way around the form navigator, and in particular gain control of the subform properties for linking to the main form data, you're well on your way.
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