Pulling data from second table

Creating tables and queries

Pulling data from second table

Postby doubletrack » Mon Jul 30, 2018 6:26 pm

Hello everyone, I've been researching and learning about Base, spreadsheets, databases... and right now I'm just confused with so much information. 

This is for a dance competition where dancers have to receive a package of photos with all their corresponding routines. Each dancer may compete with one or more routines. And each routine may include one or more dancers.

This is what I'd like to do:


TABLE I: ROUTINES INFO


ROUTINE NO  |  ROUTINE NAME       |  ROUTINE LINK


ROUTINE 01   |  ROUTINE NAME 01   |  ROUTINE LINK 01

ROUTINE 02   |  ROUTINE NAME 02   |  ROUTINE LINK 02

ROUTINE 03   |  ROUTINE NAME 03   |  ROUTINE LINK 03

.

.

.




TABLE II: DANCERS INFO


DANCER NAME         |  SCHOOL        |  ROUTINE NO   |  ROUTINE NAME       |  ROUTINE LINK


DANCER NAME 01     | SCHOOL N     |  ROUTINE 01    |  (pull from TABLE I)     | (pull from TABLE I) 

DANCER NAME 01     | SCHOOL N     |  ROUTINE 07    |  (pull from TABLE I)     | (pull from TABLE I) 

DANCER NAME 01     | SCHOOL N     |  ROUTINE 35    |  (pull from TABLE I)     | (pull from TABLE I) 

DANCER NAME 01     | SCHOOL N     |  ROUTINE 01    |  (pull from TABLE I)     | (pull from TABLE I) 

DANCER NAME 02     | SCHOOL H     |  ROUTINE 22    |  (pull from TABLE I)     | (pull from TABLE I) 

DANCER NAME 02     | SCHOOL H     |  ROUTINE 64    |  (pull from TABLE I)     | (pull from TABLE I)

DANCER NAME 03     | SCHOOL N     |  ROUTINE 07    |  (pull from TABLE I)     | (pull from TABLE I) 

DANCER NAME 03     | SCHOOL N     |  ROUTINE 09    |  (pull from TABLE I)     | (pull from TABLE I) 

DANCER NAME 04     | SCHOOL D     |  ROUTINE 08    |  (pull from TABLE I)     | (pull from TABLE I)

.

.

.

Thanks in advance for your help
OpenOffice 4.1.3 on Windows 10 Pro
doubletrack
 
Posts: 2
Joined: Sun Jul 29, 2018 2:31 pm

Re: Pulling data from second table

Postby UnklDonald418 » Mon Jul 30, 2018 11:24 pm

I uploaded a demonstration database that might get you started.
There is one form document DancerForm. It makes use of two MainForm SubForm pairs.
The top left table grid is where you can select or enter new dancers. I left the ID field visible, so you can see how the MainForm and SubForm are linked together. Since it can't be edited it would normally be hidden.
Just below is another table grid that displays the list of routines associated with the dancer selected above. You can change or add a new routine using the list box control on that grid. Again I left the ID and Dancer fields visible, but normally they would be hidden.
On the right side you can select a routine in the upper grid and the lower grid displays a list of dancers asscoiated with that routine. These grids are read only, any changes need to be made on the left side of the form document.

Demo31_Dance.odb
(13.73 KiB) Downloaded 28 times
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.6 & LibreOffice 6.1.1.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 978
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Pulling data from second table

Postby doubletrack » Tue Jul 31, 2018 12:28 am

Hi UnklDonald418, it looks pretty cool, I'll take a detailed look at it. Thanks so much!
OpenOffice 4.1.3 on Windows 10 Pro
doubletrack
 
Posts: 2
Joined: Sun Jul 29, 2018 2:31 pm


Return to Tables & Queries

Who is online

Users browsing this forum: No registered users and 5 guests