Can't find field 'Forms' referred to in the expression

DevastatioN

Registered User.
Local time
Today, 18:22
Joined
Nov 21, 2007
Messages
242
This is a weird error that appears to occur randomly for me.

I have a report named rptYearlyTimeReport that has two textboxes in the header that are filled in as shown:

=[Forms]![frmYearlyReportCriteria]![txtStartDate]

=[Forms]![frmYearlyReportCriteria]![txtEndDate]

The form frmYearlyReportCriteria is a simple form containing two textfields named txtStartDate and txtEndDate. The user fills in form and hits "Show Report", the report opens in Preview mode, and these two values are supposed to display in the header as typed in.

Sometimes when hitting the button "Show Report" the error message "Safety Information Database can't find the field 'Forms' referred to in the expression". Sometimes this error occurs when the database is loaded up freshly, and other times it does not. Even more strangely, if you continue to ok the error message and hit Show Report over and over it eventually works. Sometimes exiting the criteria form and reopening it also allows it to work without this error appearing.

The database is a split database with a backend, the code seems to work perfectly fine in the unsplit database. However, similar code works in the split database without a problem.

This problem has really baffled me, from testing purposes it appears to be the textboxes themselves, since removing them allows the report to function. If anyone has any ideas as how to fix this error, or work around it, please let me know.

Thanks,
 
Good morning

Your expression does seem alright. Maybe you should try a Compact/Repair on your database. Let us know what happens.

Regards

Maurice
 
Thanks very much!

That seems to have fixed the problem, I did a test trial of 15 runs and the error did not come up. That explains why it works on other versions of the database (unsplit), since those were compacted.

I have never seen this before, I assume it's because the query was too large, and compacting helps the computer access it with less memory usage.

Thanks once again, was truly a help :)
 

Users who are viewing this thread

Back
Top Bottom