g1smd - 2:44 pm on Feb 22, 2013 (gmt 0)
Without seeing your code, there's no way to point out the error.
There's 80 000 previous threads in this forum. Some 10 000 of them are for questions very similar to yours. Each time there is always some minor variation that makes the code in the answer very slightly different. Those other threads give a good starting point, but won't be exactly the right code.