Well, probably you should have the virtual machine set to bridged networking (in the VM settings); and, if necessary, you can also assign a static IP address to Windows 7:
http://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7
But you should also be able to use the name, instead of the IP address (which thus can remain dynamic):