Doug Murphy
dw-murphy at cox.net
Mon Oct 20 19:06:42 CDT 2014
Folks, Ran into an interesting issue in moving an application to Access 2010. The application that was originally developed in Access 98. Moved to Access 2003 and it ran fine. Moved to Access 2007 and it ran fine. In Access 2010, after fixing references etc, when we attempt to run a report that has some code behind that sets formatting we get the "Error 13, Type Mismatch" message. The line that throws this error is ' If Me.IARed = "Red" Then' where IARed is a hidden text box holding a text value of red or black. When I put Me.IARed in the immediate window it returns the value in the text box. When I put Me.IARed = "Red" in the immediate window I get the error. When I change the line to ' If CStr(Me.IARed) = "Red" Then' it works. Any idea what is happening here? As I said this worked well in previous versions and I do this all the time in other applications. I did decompile the application and compile, then compact several times. The application compiled with the original code, but would error when running. Doug