I'd have to see the schema to be sure, but from the error message it seems like the problem is that "eventObj.Source" resolves to an attribute node, and you cannot call selectSingleNode() from these objects.
What node is your OnAfterChange event firing for? If it is the attribute node, you should change it to fire on the parent node. If it is the parent node, then you should use eventObj.Site, which will always resolve to the node that is stated in the name of the method. Then, you can reliably surf to different nodes from that. If your OnAfterChange event is firing on a node that has children, then eventObj.Source will change with each firing, depending on where the change was detected, while eventObj.Site will always stay the same.
Hope this helps! Please reply with more context if you need more help.
Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge