TIP: Click on subject to list as thread! ANSI
echo: win_access
to: BILL CHEEK
from: TONY TOEWS
date: 1996-11-13 12:00:00
subject: Query Problem: ACCESS 95

 -=> Quoting Bill Cheek to All <=-
 BC> I'm suffering from a case of massive brain flatulence and can't for
 BC> the life of me, figure out the following dilemma for an ACCESS 95
 BC> situation: 
 BC> Given the following two tables where Table 1 is a list of fruits grown
 BC> in a certain county and Table 2 is a list of growers in that county
 BC> and their crops: 
 BC> Table 1                       Table 2
 BC> #===CROP===    ==#===GROWER===CROP1===CROP2===CROP3===CROP4===CROP5=
 BC> 1   Apples       1   Smith    Figs    Pears
 BC> 2   Oranges      2   Jones    Apples
 BC> 3   Bananas      3   Brown    Apples  Bananas
 BC> 4   Figs         4   Davis    Oranges
 BC> 5   Pears        5   Lynne    Apples  Oranges Bananas Figs    Pears
Yu need a third table called "Crops grown by grower"  where you have
the primary grower key and the primary crop key.  Then you create one
record for Smith Figs, another for Smith Pears, 3rd for Jones Apples and
so on.  Thus your crop table could have 5 records, your grower table 5
records and your "crops grown by grower" table 11 records.
And your report below then is very simple.
Of course, you should have still a Counter primary key on the crop, grower
and "crops grown by grower" table.  Then in your relationships you tie the
various keys together.
Tony
ttoews@agt.net | www.granite.ab.ca
--- Blue Wave/Max v2.12 [NR]
---------------
* Origin: Vermilion Lighthouse, Vermilion, Alberta (1:3413/107)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.