I have a button on a form that displays the current date. Very simple code:
MsgBox DATE
This worked for several months, but after some seemingly unrelated changes this stopped working and I get the error: run-time error '2465': Can't find the field "DATE' referred to in your expression.
Clearly, Access stopped recognizing DATE as a function, and is trying to find it as an object that doesn't exist. DATE() is immediately replaced by DATE by Access in the VBA code.
None of the objects in the form are named Date and none of the fields in the control source table have the name Date so I don't know why Access is confused.
When I create a new form with a button and the same code it works. Any ideas?