Can’t find the form “|” referred to: Solved

Sorry for yet another technical article but I just can’t let this one slide. One of the most frustrating error messages you’re likely to encounter if you are doing any Access development is:

can't find the form "|" referred to in a macro expression or Visual Basic code

In addition to being unhelpful to the extreme, this error is also difficult to search for on most search engines.

I encountered this error on a report. A control on the report was executing a function in its data source. This same function was being used successfully by another report. The change I made wasn’t referencing a form, and certainly not a form named with the pipe character (|).

As it turned out, the cause of the error was that the function my control was trying to execute could not be found. It was not a public function in a module as I had assumed, but a private function in the other report which was working. Quite logical really once I thought about it, but a big thumbs down to Microsoft for an error message that was not at all insightful, bordering on being completely incorrect.


About Adam David Collings

Adam Collings is a writer of speculative fiction who works as a software engineer during the day. He lives in Tasmania, Australia with his wife and two children. Adam is currently working on a science fiction novel.
This entry was posted in Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s