If you typed in the WEP key incorrectly, you will get an IP but will be unable to connect.
Generally the IP you'll get will be a 169.x.x.x IP address. Remove the network from your prefered networks list and reconnect, being extra careful to type the WEP key in correctly.
WEP keys consist of numbers 0-9 and the letters A-F
A common mistake is to use an o in place of a 0.