Hello,

I am trying to work out a solution I found by a good old google search but am getting nothing but unhelpful syntax errors.

Here is the link to the short answer that worked for the other person: SQL Join, 2 tables, same fields

In case you don't want to read through that, here is the basic idea. Two tables. Table 1 has messages with IDs stored for the MsgFrom and MsgTo. Table 2 is those users (ID, username). It looks like you have to do two joins. This is how the solution reads.

Code:
select m.*, u1.userName as Sender, u2.userName as Recipient 
from tabMessages as m 
  inner join tabUsers as u1 
    on u1.userId=m.msgFrom 
  inner join tabUsers as u2 
    on u2.userId=m.msgTo 
where m.msgId = @someParameter;
My problem seems similar enough that this should get me what I need. Here is what I have specifically (trimmed down for simplicity).

Issues table:
issueid description addedby assignedto
1 heat 1 2
2 water 1 3
3 roof 2 1

Users table:
userid username
1 Adam
2 Brian
3 Chad

What I am looking for is a query that will output the following:
issueid description addedby assignedto
1 heat Adam Brian
2 water Adam Chad
3 roof Brian Adam

I think part of the problem may be that I am working in Microsoft Access. Here is the query I tried based on the solution above. I just get the same syntax error each time.

Code:
SELECT m.*, f.username AS AddedBy, t.username AS AssignedTo FROM issues AS m
    INNER JOIN users AS f on m.addedby = f.userid
    INNER JOIN users AS t on m.assignedto = t.userid;
Any idea what I am doing wrong? Thank you in advance for your help.

Swani