Wiring problem or DME issue. Rember though you need to match a late DME to late AFM and early DME to early AFM. The difference is voltage range from the early vs late AFM. Make sure you have the same DME.
If you do not have an AFM signal the car will start on the starter, but shut off right away. No tach signal is a sign of speed/ref sensor errors.
This not an easy problem to fix, but you will need to go after the wiring as it really sounds like that is a problem. The DME has its own harness that runs from the DME plug to the speed/ref sensors, AFM plug, ISV plug, Temp sensor for DME and temp gauge, oil pressure gauge and fuel injectors. Breaks in this harness mean trouble. The DME relay is not connected to the harness or the DME directly. This sounds a little strange, but and right now I can't remember how the DME gets power, but I do know the DME harness is seperate from the body harness as I have removed and replaced a it a time or two. Anyway these wires can get damaged from the heat of the engine bay and look ok, but fail when wiggled. Any number of these wires can cause a failure.