Umm, the idea is that you should try the suggestion. You didn't. You instead provided a notebook that won't run the NDSolve, and fails for a very obvious reason. A bit of debugging before posting is always a good idea.
NDSolve
Hmmm, not sure bout that but, here's the file attached regarding my problem. Hopefully you can help me out. Thanks a lot.
thanks man, but I still can't get it using "While" though the site on doc recommended was helpful. Anyway I've attached the nb. file and hopefully and you can test it out. I appreciate your help very much.
Best regards, Aaron Aw
Could write it in terms of Piecewise.
Piecewise
Have you considered using a WhenEvent? I had a similar problem once myself. Check out the docs as well. It would be nice if you posted the code so one can copy it at run it easily instead of screenshoting it.
WhenEvent