I can't see this specific problem described already, here or via Google, but I apologize in advance if I was just searching using the wrong terms.
Many of the Access databases I look after include some variation of
Where Nz is used to replace a Null value in the txtApproval field with an empty string.
These have been working without issue for years.
As of today, any line that uses the Nz function and has a cell which IS blank, produces an error message
"Run-time error '-2147352567 (80020009)': You entered an expression that has no value"
I should stress that the first db in which this happened hasn't changed in at least three months and has been used regularly since then.
It may be a coincidence but this week we got a software updated that included some changes for Office 365.
I've tried:
Does Nz not work any more?
Do I need to declare something extra or add a different reference?
Is there another way of handling blank fields on a form?
It's bad enough if I change something and it stops working. When a feature was fine one day and not the next, without me touching the db, it puzzles me.
Many of the Access databases I look after include some variation of
Code:
If Nz(txtApproval, "") <> "" Then
These have been working without issue for years.
As of today, any line that uses the Nz function and has a cell which IS blank, produces an error message
"Run-time error '-2147352567 (80020009)': You entered an expression that has no value"
I should stress that the first db in which this happened hasn't changed in at least three months and has been used regularly since then.
It may be a coincidence but this week we got a software updated that included some changes for Office 365.
I've tried:
- Commenting out the problematic line of code, in case the issue was control-specific, but it just runs to the next one where Nz is used and displays the same error message
- Testing in multiple databases. All produce the same error
- Checking for compilation errors. None found
- Putting a 'dummy' value into the field in question. No error occurred
- Checking for missing references. None were labeled 'MISSING' or not displayed at all. Microsoft Access 16.0 Object Library is still present
- Using a message box to display the value in that field just before the Nz line. In this case, I get "Run-time error '2427': You entered an expression that has no value", which I expected to get
Does Nz not work any more?
Do I need to declare something extra or add a different reference?
Is there another way of handling blank fields on a form?
It's bad enough if I change something and it stops working. When a feature was fine one day and not the next, without me touching the db, it puzzles me.