Daniel-

You need to include Booking.MemberID and Booking.FacilityID in your query.
For members, set Booking.MemberID as the Control Source of your combo box
(that's the Foreign Key), and as soon as you pick a value in the combo,
Access should autolookup the member's address info.  Ditto FacilityID.

John Viescas, author
"Building Microsoft Access Applications"
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Daniel
Sent: Monday, December 12, 2005 7:29 PM
To: [email protected]
Subject: [ms_access] Re: Form help request

Ok, Here is the layout


Member:   MemberID,  Name,  Address1,  Address2,  PostCode, 
DateofBirth,            CategoryCode

Facility:  FacilityID,  FacDescription, Price (per session)

Session:  SessionNo,  TimeRange

Category:  CategoryCode, CatDescription, AnnualCost, Discount

Booking:   BookingId, MemberID, FacilityID, SessionNo, SessionDate, 
                        BookingDate, Cost


**SQL** 


SELECT Member.Name, Member.Address1, Member.Address2, 
Member.PostCode, Member.DateOfBirth, Category.CatDescription, 
Facility.FacDescription, Session.SessionNo, Session.TimeRange, 
Booking.SessionDate, Booking.BookingDate, Facility.Price, 
Category.Discount, Booking.Cost
FROM [Session] INNER JOIN ((Category INNER JOIN Member ON 
Category.CategoryCode = Member.CategoryCode) INNER JOIN (Facility 
INNER JOIN Booking ON Facility.FacilityId = Booking.FacilityId) ON 
Member.MemberId = Booking.MemberId) ON Session.SessionNo = 
Booking.SessionNo;


Thanks 

Daniel.



--- In [email protected], "John Viescas" <[EMAIL PROTECTED]> wrote:
>
> Daniel-
> 
> What's the structure of your tables?  And what is the current 
Record Source
> of the form (the SQL)?  And please include the previous text from 
the thread
> in your replies.  If I hadn't just answered your question, I 
wouldn't have a
> clue what you're talking about.
> 
> John Viescas, author
> "Building Microsoft Access Applications"
> "Microsoft Office Access 2003 Inside Out"
> "Running Microsoft Access 2000"
> "SQL Queries for Mere Mortals"
> http://www.viescas.com/
>  
> 
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] 
On Behalf
> Of Daniel
> Sent: Monday, December 12, 2005 7:10 PM
> To: [email protected]
> Subject: [ms_access] Re: Form help request
> 
> Hi John, im using a multi table query for the frm and i have the 
combo 
> box set for Name from Members tbl for risk of sounding stupid 
(where 
> do i set the foreign key)?
> 
> p.s. i just bought your book on Sunday "Inside Out 2003"
> 
> Daniel.
> 
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
>







 
Yahoo! Groups Links



 






------------------------ Yahoo! Groups Sponsor --------------------~--> 
AIDS in India: A "lurking bomb." Click and help stop AIDS now.
http://us.click.yahoo.com/9QUssC/lzNLAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to