A family of Microsoft relational database management systems designed for ease of use.
Given that saving the database using Save As resolved the problem, the most likely cause is corruption in the original.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The same field is used on a number of reports to show the date when the report was printed. It is an unbound field with "=Date()" to provide the current system date (in medium date format). This has worked wonderfully well and simply for the last 10 years and now fails. Presumably from an Office 365 update?
Can you please reupdate your software to rectify this problem.
A family of Microsoft relational database management systems designed for ease of use.
Given that saving the database using Save As resolved the problem, the most likely cause is corruption in the original.
After trying several suggestions it seems that this particular database lost its connection with the built-in date related functions. Compact and repair the database did not resolve the issue. On opening the report a text box popped up asking for the parameter date; pressing enter opened the report and showed #Name? where the current system date should appear.
What has resolved the problem is saving the database with a different name (Save As) and this new version has worked as intended.
A bit disappointed not fixing the problem in the original database, but will work on that later when more time is available.
There have been some great suggestions. I would open the code window, press Ctrl+G and enter this into the immediate window:
? Date()
Does this display the current date? While in the code, try compile your file from the menu bar.
"Fails" is too vague to be useful in diagnosing the problem and offering suggestions.
Please state what does happen instead of displaying the correct date. An error? The wrong date? Nothing at all?
A screenshot would be helpful.
Also, what version and build of Access do you have installed. You can get that by running this command in the immediate window.
?Syscmd(acSysCmdGetFullVersion)
Microsoft Access (Version 2608) Build 16.0.20326.20144 Current Channel 32-bit
Does this problem appear in every control on every form where this expression is used?
Can you create a new form with one unbound control on it and verify that it happens there as well?
Do you have multiple users? Do all of them have the same error in their copies of the database?The more detail you provide to help us identify potential problems the better the chance of getting a useful suggestion.
Thank you.
The =Date() function is a standard built-in Access function and would not normally stop working without an underlying cause. Since this expression has been working reliably in your reports for many years, it's worth carrying out a few troubleshooting steps before concluding that an update is responsible.
I recommend first performing some troubleshooting within Access:
=Date() as the Control Source. If the new report displays the date correctly while the original report does not, the issue is likely specific to the report or control configuration rather than the Date() function itself.=Now() to see whether they return values correctly.If the issue persists, I would recommend repairing Microsoft 365 Apps:
If the issue continues after an Office repair, and you have presumably confirmed that the behavior started following a Microsoft 365 update, then it would be reasonable to investigate the possibility of an update-related regression. In that case:
As a temporary workaround, you may also consider rolling back Microsoft 365 to a previously known working build. If the issue disappears after the rollback, that would help confirm whether a recent update introduced the problem and provide useful information for Microsoft's investigation.
If you need any further assistance, please don't hesitate to leave a comment.
Kind Regards,