jazminecat
Programmer
Code:
SELECT BidsTable.BidNum, BidsTable.DocumentTitle, BidsTable.NoticeDate1, BidsTable.NoticeDate2, BidsTable.NoticeDate3, BidsTable.OpeningDate, BidsTable.AwardedTo, tblYear.Year, tblDepartment.Department, BidsTable.[2Department]
FROM tblDepartment INNER JOIN (BidsTable INNER JOIN tblYear ON BidsTable.YearID = tblYear.YearID) ON tblDepartment.ID = BidsTable.Department
ORDER BY tblYear.Year DESC , BidsTable.BidNum;
I have a form based on this query.
However, in my table I now have a need for a second department listing, called 2Department. Not all records will have a second department, but some do. For those records, the ID of the department is stored in the field 2Department. I need to have this query lookup the department name from the department table and show that name when the query is run, when the form loads.
(I have no idea why it's putting brackets around 2Department, but if I go into SQL view to remove them it throws an error so I left them there.)
any help is appreciated.