Comparing the value of two variables

Rather than start a new thread, I'll jump on this one, as I have a similar problem.While I have no difficulty comparing two variables by using VAR(x), I am having issues with comparing times.I'll lay out what I'm doing. I am measuring how long a person has been in a chapter. In Page 1, I modify varTimeIn to be equal to ElapsedTime. Ex: varTimeIn = 00:00:17In Page n, I modify varTimeOut to be equal to ElapsedTime. Ex: varTimeOut = 00:00:28Also in Page n, I modify varTotalTime to be equal to VAR(varTimeOut). Ex: varTotalTime = 00:00:28Also in Page n, I modify varTotalTime by subtracting varTimeIn from it. Ex: varTotalTime = 00:00:11Also in Page n, I modify varBestTime to be equal to VAR(varTotalTime) IF varBestTime > VAR(varTotalTime) Ex: 00:00:38 > 00:00:11 = TRUE so varBestTime = 00:00:11In Page n, the user has a chance to go back to Page 1 and attempt to get a better varBestTime. The algorithm should work, but the system seems to be having issues with the comparison. Sometimes it replaces the best time, and sometimes it doesn't (even if it should).Are there any gotchas I need to note with comparing time variables? I'm almost wondering if I am comparing a time to an integer, but I don't know how to set the VAR(varTotalTime) to be in a time format. I can easily make it work if I have varBestTime > 00:00:40. A hard-coded value works well. It's the variable that I'm having issues with.Any ideas?KevinEdited By: Kevin Elmore on 2007-12-26 13:38:38

Discussions have been disabled for this post