Error when opening Access Report (1 Viewer)


New member
Apr 29, 2024
I have a report that displays either #REF or #NAME for some of the fields (but not all) when I open it up in print preview. If I switch to design view and then back to print preview it corrects the error and everything displays correctly. Odd thing is that until yesterday, everything was working perfectly. Not sure how to fix. Any suggestions would be greatly appreciated. Thank you!
Is there any macro or vba code in that report?
Do you have code anywhere that may change the query used as the RecordSource for this report?
OK, #NAME is easy. Whatever would have been in that slot was being called out by name, and you got the name wrong. #REF is harder but generally means that you perhaps passed an object by reference and got the name of the object wrong.

Note that NEITHER of those explanations is exclusive.

What you need to do to fix this is to look at the places where those errors occur. Go back in design mode and examine the data sources for those particular elements to verify spelling and/or existence.

Another question is, if there is any code involved such as defining the object via some VBA code that loads a formula, it is possible that the formula contains a bad reference or bad name. However, this might be due to not having Option Explicit at the top of every module including both general and form/report class modules. If you have Option Explicit, you CAN'T get away with referencing an unknown object in code.
Sounds like a similar problem:

Users who are viewing this thread

Top Bottom