I recently converted my Access 97 database to Access 2003 and ran across the following problem:
In a reports recourse source, I was using a function in the recordsource as a criteria value. The function simply returns a constant from within my program. Per example: SELECT * FROM ABC WHERE year > getCurrentYear().
The public function getCurrentYear() returns the value for a public constant taxYear. In Access 97, it is returning records, but it returns no records in Access 2003. I hand checked the values and it should be returning records.
I did a little troubleshooting and converted the return value from the function into a long (Clng). This fixed the problem. Is there any way I can explicitly have Access convert values for me?
I have many reports/forms relying on these type of comparisons that worked in 97. It scares me that the report doesn't return an error, but just returns no records.
In a reports recourse source, I was using a function in the recordsource as a criteria value. The function simply returns a constant from within my program. Per example: SELECT * FROM ABC WHERE year > getCurrentYear().
The public function getCurrentYear() returns the value for a public constant taxYear. In Access 97, it is returning records, but it returns no records in Access 2003. I hand checked the values and it should be returning records.
I did a little troubleshooting and converted the return value from the function into a long (Clng). This fixed the problem. Is there any way I can explicitly have Access convert values for me?
I have many reports/forms relying on these type of comparisons that worked in 97. It scares me that the report doesn't return an error, but just returns no records.