Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How do I display query results from joined tables (using D..

 
   Database Help (Home) -> Visual Basic RSS
Next:  Connect to SQL Server  
Author Message
Peter M

External


Since: May 25, 2004
Posts: 5



(Msg. 1) Posted: Fri May 28, 2004 6:28 pm
Post subject: How do I display query results from joined tables (using DAO
Archived from groups: comp>lang>basic>visual>database (more info?)

A bit of a newbie question

How do I display results from Joined tables?

[Ships Table]
ShipID
ShipName

[Voyages Table]
VoyageID
ShipID - Foreign Key(Ships Table)
VoyageName
DepartureDate
ArrivalDate

[Passengers Table]
PassengerID
VoyageID - Foreign Key(Voyages Table)
PassengerName

I wish to run a query (search) on the passengers table (by PassengerName)
and return a recordset displaying
PassengerName, ArrivalDate (Voyages Table), VoyageName (Voyages Table),
ShipName (Ships Table)

The above Tables are linked with One to Many Relationships

I understand I use the join method in a query but what (and how) can I use
to display the (DAO) result - DBgrid, MSFlexGrid ?

I am using VB6 with Access2000

 >> Stay informed about: How do I display query results from joined tables (using D.. 
Back to top
Login to vote
Peter M

External


Since: May 25, 2004
Posts: 5



(Msg. 2) Posted: Fri May 28, 2004 7:49 pm
Post subject: Re: How do I display query results from joined tables (using [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Ah! figured it out!


Thanks anyway


"Peter M" <pmarquet DeleteThis @ihug.co.nz> wrote in message
news:zmytc.11088$XI4.399112@news.xtra.co.nz...
 > A bit of a newbie question
 >
 > How do I display results from Joined tables?
 >
 > [Ships Table]
 > ShipID
 > ShipName
 >
 > [Voyages Table]
 > VoyageID
 > ShipID - Foreign Key(Ships Table)
 > VoyageName
 > DepartureDate
 > ArrivalDate
 >
 > [Passengers Table]
 > PassengerID
 > VoyageID - Foreign Key(Voyages Table)
 > PassengerName
 >
 > I wish to run a query (search) on the passengers table (by PassengerName)
 > and return a recordset displaying
 > PassengerName, ArrivalDate (Voyages Table), VoyageName (Voyages Table),
 > ShipName (Ships Table)
 >
 > The above Tables are linked with One to Many Relationships
 >
 > I understand I use the join method in a query but what (and how) can I use
 > to display the (DAO) result - DBgrid, MSFlexGrid ?
 >
 > I am using VB6 with Access2000
 >
 ><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: How do I display query results from joined tables (using D.. 
Back to top
Login to vote
Display posts from previous:   
   Database Help (Home) -> Visual Basic All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]