As far as your (IACV) idle air control valve, I can hardly see how it would cause the symptoms you experienced.
I am going to take a guess & say that what probably showed up on the odometer portion of your speedometer said "NO BUS". I am not an expert on these things & I wouldn't offer input except you aren't getting a whole lot yet. I believe the "NO BUS" message means that the PCM is not communicating with one or some of the sensors. As I typed, I am not an expert, so hopefully some one will chime in.
When you say that the engine tried to turn over but wouldn't, I assume you mean that it turned over but wouldn't light off? Or are you saying it wouldn't even turn over?
My experience is limited, but I did have a scenario, a few years back with my '03 5.9 Dakota, in which it would intermittently shut down & after a period of time it would start & run normally & NOT store a code. It was intermittent so I found it difficult to troubleshoot, so I threw some parts at it (ASD & fuel pump relays, crank & cam position sensors). The issue devolved to being permanent (as opposed to intermittent) so I followed the troubleshooting procedure for "crank but no start" and wound up finding no signal to the coil & this led me to suspect that the PCM was at fault. I did wind up sending the PCM out to a facility where they bench checked it & repaired it & my Dakota has started & ran fine ever since.
With that typed, I am not suggesting that this is your issue, just relating my experience which seems somewhat similar to yours. As long as your issue stays intermittent, in my opinion it will be hard to troubleshoot.