Hi there,
I'm struggling to get a query to select the right number of records based on field selections from 3 tables.
Table 1 (tblEvents) has the below list of fields:
Event ID
Client ID
Location ID
Consultant ID
Work Requested By
Other work
Date Work Completed
Rate ID
Rate Amount
Any other details
Telephone Call
Telephone Incoming/Outgoing
Telephone Time (mins)
Email
Email Incoming/Outgoing
Email Time (mins)
Meeting
Meeting - preparation time hrs
Meeting - preparation time mins
Meeting - meeting time hrs
Meeting - meeting time mins
Meeting - meeting notes write up hrs
Meeting - meeting notes write up mins
Meeting - include travel?
Meeting - mileage
Meeting - car park charges/tolls
Meeting - charge amount
Meeting - public transport
Meeting - one way
Meeting - return
Meeting - public transport amount
Meeting - include hotel/subsistence?
Meeting - hotel amount
Project or Specific Tasks
Project Time hrs
Project Time mins
Proj - include travel?
Proj - mileage
Proj - car park charges/tolls
Proj - charge amount
Proj - public transport
Proj - one way
Proj - return
Proj - public transport amoount
Proj - include hotel/subsistence
Proj - hotel amount
Training
Training - preparation time hrs
Training - preparation time mins
Training - on site hrs
Training - on site mins
Training - follow-up hrs
Training - follow-up mins
Training - include travel?
Training - mileage
Training - car park charges/tolls
Training - charge amount
Training - public transport
Training - one way
Training - return
Training - public transport amount
Training - include hotel/subsistence?
Training - hotel amount
Credit Report
Type
Other
Other time hrs
Other time mins
Subject
Advice given/work undertaken
Meeting - custom
Meeting - custom amount
Meeting - custom notes
Training - custom
Training - custom amount
Training - custom notes
Proj - custom
Proj - custom amount
Proj - custom notes
Meeting - custom time
Training - custom time
Proj - custom time
Table 2 (tblNonClient) has the below list of fields:
Event ID
Consultant ID
Date Work Completed
Reading Trade Press
Reading hours
Reading mins
Research
Research hours
Research mins
Recruitment
Recruitment hours
Recruitment mins
Training
Training hours
Training mins
Meetings
Meetings hours
Meetings mins
Conferences
Conferences hours
Conferences mins
Other
Other hrs
Other mins
Streamline Development
Streamline hours
Streamline mins
Marketing
Newsletter hours
Newsletter mins
Prospecting
Prospecting hours
Prospecting mins
Subject
Newsletters
Writing articles
Updates to websites
Writing hours
Writing mins
Updates hours
Updates mins
Mailings
Mailings hours
Mailings mins
Marketother
Marketother hours
Marketother mins
Other details
Meeting location meeting room
Meeting location other
Location other
Training location meeting room
Training location other
Location other train
Meeting attendees
Training attendees
Table 3 (tblConsultants) has just 2 fields:
Consultant ID
Consultant Name
Now what I am trying to do is select all the fields from each of the two tables, and group them underneath the corresponding Consultant ID. Whenever I try making a query for this, I either only end up with the records where a given Consultant appears in both, or duplicates where the Consultant appears on both. Can someone help me with this?
Regards,
Jack
I'm struggling to get a query to select the right number of records based on field selections from 3 tables.
Table 1 (tblEvents) has the below list of fields:
Event ID
Client ID
Location ID
Consultant ID
Work Requested By
Other work
Date Work Completed
Rate ID
Rate Amount
Any other details
Telephone Call
Telephone Incoming/Outgoing
Telephone Time (mins)
Email Incoming/Outgoing
Email Time (mins)
Meeting
Meeting - preparation time hrs
Meeting - preparation time mins
Meeting - meeting time hrs
Meeting - meeting time mins
Meeting - meeting notes write up hrs
Meeting - meeting notes write up mins
Meeting - include travel?
Meeting - mileage
Meeting - car park charges/tolls
Meeting - charge amount
Meeting - public transport
Meeting - one way
Meeting - return
Meeting - public transport amount
Meeting - include hotel/subsistence?
Meeting - hotel amount
Project or Specific Tasks
Project Time hrs
Project Time mins
Proj - include travel?
Proj - mileage
Proj - car park charges/tolls
Proj - charge amount
Proj - public transport
Proj - one way
Proj - return
Proj - public transport amoount
Proj - include hotel/subsistence
Proj - hotel amount
Training
Training - preparation time hrs
Training - preparation time mins
Training - on site hrs
Training - on site mins
Training - follow-up hrs
Training - follow-up mins
Training - include travel?
Training - mileage
Training - car park charges/tolls
Training - charge amount
Training - public transport
Training - one way
Training - return
Training - public transport amount
Training - include hotel/subsistence?
Training - hotel amount
Credit Report
Type
Other
Other time hrs
Other time mins
Subject
Advice given/work undertaken
Meeting - custom
Meeting - custom amount
Meeting - custom notes
Training - custom
Training - custom amount
Training - custom notes
Proj - custom
Proj - custom amount
Proj - custom notes
Meeting - custom time
Training - custom time
Proj - custom time
Table 2 (tblNonClient) has the below list of fields:
Event ID
Consultant ID
Date Work Completed
Reading Trade Press
Reading hours
Reading mins
Research
Research hours
Research mins
Recruitment
Recruitment hours
Recruitment mins
Training
Training hours
Training mins
Meetings
Meetings hours
Meetings mins
Conferences
Conferences hours
Conferences mins
Other
Other hrs
Other mins
Streamline Development
Streamline hours
Streamline mins
Marketing
Newsletter hours
Newsletter mins
Prospecting
Prospecting hours
Prospecting mins
Subject
Newsletters
Writing articles
Updates to websites
Writing hours
Writing mins
Updates hours
Updates mins
Mailings
Mailings hours
Mailings mins
Marketother
Marketother hours
Marketother mins
Other details
Meeting location meeting room
Meeting location other
Location other
Training location meeting room
Training location other
Location other train
Meeting attendees
Training attendees
Table 3 (tblConsultants) has just 2 fields:
Consultant ID
Consultant Name
Now what I am trying to do is select all the fields from each of the two tables, and group them underneath the corresponding Consultant ID. Whenever I try making a query for this, I either only end up with the records where a given Consultant appears in both, or duplicates where the Consultant appears on both. Can someone help me with this?
Regards,
Jack