Jason: Everytime someone says that the problem does not happen when you are tracing, the first response is: make sure you SET WHILEOPT OFF. Do you know what your whileopt setting is?
Karen > I'm having a strange problem with typecasting. I was hoping someone > else on the list could try and duplicate the problem for me, or point out > where > I am going wrong. The problem is especially strange because if I have SET > TRACE ON in my code, the problem does not happen. > I have a form which in certain circumstances requires the user to enter > a date and time. I want to compare the date and time entered to the current > time to make sure that the time entered is in the future. I use a DIALOG > command with a popup. I have put the code below. > If I run the EEP without a SET TRACE ON in the code, then I get error > 2158 (-ERROR- Expression does not return a valid DATETIME.), followed by > error > 3031 (-ERROR- SET Error Command). > If I run the code with a SET TRACE ON statement, the code executes fine. > It even executes fine if I never step through the code and just press the > green triangle/play button as soon as the trace window opens. > I am running 7.6.5.31229 > Thanks, > Jason

