I have very little experience with SQL and Access, but here it goes. I have a field called DivisionName and one called DivisionNumber. The DivisionNumber is populating fine. What I need to do is populate the DivisionName dependant on what the DivisionNumber is. For example: DivisionNumber = 111 and this refers to DivisionName = Maintenance, and DivisionNumber = 129 refers to DivisionName = Sales. I have a single table (tblDivisionInfo) in which both these fields are in. I am thinking I may need a If Else statement inserted somewhere in the SQL, but I don't know where or how. The SQL of the query below may assist. I am querying tables to generate a report and export to an excel file. If there is any way to accomplish this with the expression builder … let me know. Thanks for any assistance you can provide.

SELECT tblDivisionInfo.[DivisionName], Mid([tblDivisionInfo. [DivisionNumber],4,3), tblAce.[CenterName], tblAce.[Center Desc], tblAce.[Expenses], tblAce.[Budget], tblAce.[Balance]
FROM tblDivisionInfo, tblAce
RIGHT JOIN tblAce ON tblDivisionInfo.DivisionName = tblAce.DivisionName
ORDER BY tblAce.[CenterName];

Structure



tblDivisionInfo

DivisionName text
DivisionNumber text

tblAce

CenterName text
Center Desc text
DivisionName text
Expenses number
Budget number
Balance currency