Access help with query - find last value in row of record

kingerick

New Member
Joined
Apr 20, 2006
Messages
21
hello all,
learning Access and I'm stuck. Is there a way to create a calculated field to find the last value in a row of a record? What I have is an employee DB so the unique is the employee. along with other data, i have management hierarchy to the top as fields manager level 1, manager level 2, manager level 3 down to manager level 15. the way it works is manager 1 is the highest level of management and it goes down in number until we hit the immediate (or reporting to) manager. so depending on the employees level and dept or line of business, they will have a different number of management above them. example: a VP will only have the President above them but a entry level person will have a manager then director then regional director then regional SVP then a VP then a pres. What I want to do is create a field in the query to show the first listed manager which would be their "reports to" manager. I know this is doable in excel but I want to make this happen in the query if it's possible.

employee# | employee name | management level 1 | management level 2 | management level 3 | management level 4 | management level 5 | --desired result--
0001 | A.smith | H. Jones | A. James |blank |blank | blank |A. James
0002 | B.smith | H. Jones | A. James |A. Frank |D. Wade | blank |D. Wade
0003 | B.smith | H. Jones | A. James |A. Frank |blank | blank |A. Frank

thanks in advance for any help you can provide
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Unfortunately your table is designed like an spreadsheet (not normalized) and not a relational database. In a well normalized databse this would be very simple.

This example may help:


Access Treeview Example
Displaying Hierarcharical Data. This example uses Employees and the people under them
 
Upvote 0

Forum statistics

Threads
1,215,217
Messages
6,123,670
Members
449,115
Latest member
punka6

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top