TIP: Click on subject to list as thread! ANSI
echo: win_access
to: ALL
from: BILL CHEEK
date: 1996-11-10 19:41:00
subject: Query Problem: ACCESS 95

Yo, ACCESS Freaks!
I'm suffering from a case of massive brain flatulence and can't for the life 
of me, figure out the following dilemma for an ACCESS 95 situation:
Given the following two tables where Table 1 is a list of fruits grown in a 
certain county and Table 2 is a list of growers in that county and their 
crops:
   Table 1                       Table 2
#===CROP===    ==#===GROWER===CROP1===CROP2===CROP3===CROP4===CROP5=
1   Apples       1   Smith    Figs    Pears
2   Oranges      2   Jones    Apples
3   Bananas      3   Brown    Apples  Bananas
4   Figs         4   Davis    Oranges
5   Pears        5   Lynne    Apples  Oranges Bananas Figs    Pears
I need to generate a report or query (preferably a query) that
looks exactly like this:
REPORT or QUERY
=CROP======GROWER===
Apples     Jones
Apples     Brown
Apples     Lynne
Bananas    Brown
Bananas    Lynne
Figs       Smith
Figs       Lynne
Oranges    Davis
Oranges    Lynne
Pears      Smith
Pears      Lynne
Table 1 may not be needed, but it is available.
Catch-22 is that I need separate lines for each fruit relative to WHO grows 
it. Even though each grower has only one record in Table 2, I need something 
to generate multiple records of that grower if he has more than one crop.
How can this be done in the QBE grid of ACCESS 95 (without having to write 
code?
     SAMPLE QBE GRID OFFERED FOR CONVENIENCE OF REPLY
============================================================================
   Field:|  CROP   | GROWER  | CROP1   | CROP2   | CROP3   |  CROP4  | CROP5
----------------------------------------------------------------------------
   Table:|         |         |         |         |         |         |
----------------------------------------------------------------------------
    Sort:|         |         |         |         |         |         |
----------------------------------------------------------------------------
    Show:|   Yes   |  Yes    |  No     |  No     |  No     |  No     |  No
----------------------------------------------------------------------------
Criteria:|         |         |         |         |         |         |
----------------------------------------------------------------------------
      Or:|         |         |         |         |         |         |
----------------------------------------------------------------------------
Thanks in advance for any insight.
Bill Cheek | Internet: bcheek@cts.com | Compu$erve: 74107,1176
Windows 95 Juggernaut Team | Microsoft MVP
--- Hertzian Mail+
---------------
* Origin: Hertzian Intercept-San Diego 619-578-9247 (6pm-1pm) (1:202/731)

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™.