When you (correctly) boot the Windows 7 DVD to install, it will scan the HD and if it sees any other OS will pass a flag allowing use of Upgrade version key during install - even if you go on to use Custom>Drive Options to delete, repartition and/or format during install.
If you install to a clean or new HD, leave the Product Key blank during install then after install use one of the available (in case of HD failure) which Derek linked to, easiest of which is doing the quick registry workaround after install.