If what you want to see if a signal as it goes through several layers (electrically connected) you need at least ViewMate Pro for this.
However, if you just want to select all elements of a given D Code, make sure the D Code number appears in the Current Element toolbar, then check the checkbox next to it (which says "Only").
Then do a global select ("Select/Global/New" - shortcut key "V").
This will select elements as filtered by the Only checkboxes.
So if you have "Only" D40 checked, it will select all elements of D Code 40.