RobertC004
New member
- Local time
- Today, 06:33
- Joined
- Mar 28, 2020
- Messages
- 2
Hello!
I'm new to this forum... but have found a lot of answers to questions in the past. I'm pretty well versed in Excel, but Access stumps me a bit, at times.
I have a .txt file that gets refreshed each week. In the front end DB, we run queries, which then pushes the synthesized data to a BackEnd DB.
There is a lookup table in Access that looks a lot like the one below:
In the report that spits out to .txt file, I would get the following data:
In the formatted report, at the end, I need to have all four columns populated.
How could I, in query form, get Access to "fill in" the "Reason Text" column?
It's not a straight up join, as the Reason Text is dependent on the combination of Type Code & Reason Code.
I was thinking about doing an Update Query in two steps... or possibly splitting the Lookup Table into two... but I'm thinking there might be an easier solution.
In Excel, I would likely do a VLookup on the Concatenation of the Two Codes... but i'm not even sure that's a solution in Access.
Any suggestions?
Thank you!
I'm new to this forum... but have found a lot of answers to questions in the past. I'm pretty well versed in Excel, but Access stumps me a bit, at times.
I have a .txt file that gets refreshed each week. In the front end DB, we run queries, which then pushes the synthesized data to a BackEnd DB.
There is a lookup table in Access that looks a lot like the one below:
Type Code | Type Text | Reason Code | Reason Text |
XG | Change of Position | X5 | Promotion-Regular |
XQ | Transfer | X5 | Transfer Back |
XG | Change of Position | X6 | Promotion-Growth |
XQ | Transfer | X6 | Transfer - Line of Business |
In the report that spits out to .txt file, I would get the following data:
Type Code | Type Text | Reason Code | Reason Text |
XG | Change of Position | X5 | <blank> |
XQ | Transfer | X5 | <blank> |
XG | Change of Position | X6 | <blank> |
XQ | Transfer | X6 | <blank> |
In the formatted report, at the end, I need to have all four columns populated.
How could I, in query form, get Access to "fill in" the "Reason Text" column?
It's not a straight up join, as the Reason Text is dependent on the combination of Type Code & Reason Code.
I was thinking about doing an Update Query in two steps... or possibly splitting the Lookup Table into two... but I'm thinking there might be an easier solution.
In Excel, I would likely do a VLookup on the Concatenation of the Two Codes... but i'm not even sure that's a solution in Access.
Any suggestions?
Thank you!