![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Once again, I turn to the masters for help that I thought I ought to know by now. I have tblAttendees and tblGuests. tblGuests has a field GuestOf linked to tblAttendees field AttendeeID. I have a form based on tblAttendees with a subform based on tblGuests. I believe everything seems normalized and smooth but what I would like to do is include the original Attendee in my subform of Guests. I was able to do this when I created the DB with all the Guests under one table. However, unique information about Attendees has to be kept so they really need their own table. I have tried to create a UNION query (which I'm not experienced much at) but to no success. I don't even know if a UNION query is the right approach. Its a small DB and would be fine with a redesign if thats what it takes. Here is my UNIONqry code: SELECT tblGuest.GuestID, tblGuest.GuestOfAttendee, tblGuest.FirstName, tblGuest.LastName, tblGuest.IsAttendee, tblGuest.DOB, tblGuest.Sex FROM tblGuest UNION SELECT tblAttendee.AttendeeID,tblAttendee.FirstName,tblAt tendee.LastName,tblAttendee.DOB,tblAttendee.Sex,tb lAttendee.MiddleName,tblAttendee.City FROM tblAttendee WHERE tblAttendee.AttendeeID = tblGuest.GuestOfAttendee ORDER BY tblGuest.IsAttendee, tblGuest.DOB; Thanks for any help! -WhathaveIdone? |
#3
| |||
| |||
|
|
Once again, I turn to the masters for help that I thought I ought to know by now. I have tblAttendees and tblGuests. tblGuests has a field GuestOf linked to tblAttendees field AttendeeID. I have a form based on tblAttendees with a subform based on tblGuests. I believe everything seems normalized and smooth but what I would like to do is include the original Attendee in my subform of Guests. I was able to do this when I created the DB with all the Guests under one table. However, unique information about Attendees has to be kept so they really need their own table. I have tried to create a UNION query (which I'm not experienced much at) but to no success. I don't even know if a UNION query is the right approach. Its a small DB and would be fine with a redesign if thats what it takes. Here is my UNIONqry code: SELECT tblGuest.GuestID, tblGuest.GuestOfAttendee, tblGuest.FirstName, tblGuest.LastName, tblGuest.IsAttendee, tblGuest.DOB, tblGuest.Sex FROM tblGuest UNION SELECT tblAttendee.AttendeeID,tblAttendee.FirstName,tblAt tendee.LastName,tblAttendee.DOB,tblAttendee.Sex,tb lAttendee.MiddleName,tblAttendee.City FROM tblAttendee WHERE tblAttendee.AttendeeID = tblGuest.GuestOfAttendee ORDER BY tblGuest.IsAttendee, tblGuest.DOB; Thanks for any help! -WhathaveIdone? |
![]() |
| Thread Tools | |
| Display Modes | |
| |