If you install Windows and THEN change from IDE to AHCI (or vice versa) then Windows won't be able to boot because it doesn't have the right drivers loaded. You can fix this as follows:
1) Run the Registry Editor (regedit.exe)
2) Navigate to Registry Key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Msahci
3) Set the "Start" value to 0 (zero)
4) Navigate to Registry Key: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Pciide
5) Set the "Start" value to 0 (zero)
6) Shut down
7) Start up again, but before Windows boots go into the BIOS configuration screens and change the disk mode to "AHCI". Save the new BIOS configuration and restart so that Windows boots.
When Windows starts, it will detect the change, load new disk drivers, and do one more reboot to start up with them.