Hi All,
I was wondering if someone can help me out with this weird error. Symptoms:
1. Error 3075 appears on a query that previously worked, but is not working now. It also appears when I try to use functions on [fields] in SQL.
2. The icons in the VBA editor disappear, but the button is still there, the pop button text appears, and the button still works. This goes away if I restart ms access and restart my computer.
3. The query won't work in VBA (DoCmd.RunSQL (strSQL)), or in the query builder.
I created a test database and modified the query to see how it behaves underneath certain conditions.
Original: Did work/Now it doesn't
Code:
SELECT (IIF(([Metric1] IS NULL OR LEN([Metric1])=0), 0, [Metric1])+IIF([Metric2] IS NULL, 0, [Metric2])) AS Result FROM [TESTTable] WHERE [ID]='03';
Modified: Doesn't Work on Problem DB / Works on Test DB
Code:
SELECT NZ[Metric1] + NZ[Metric2] AS Result FROM [TESTTable] WHERE [ID]='03';
Simpler expression: Doesn't Work on Problem DB / Works on TestDB
Code:
SELECT LEN([Metric1]) AS Result FROM [TESTTable] WHERE [ID]='03';
Another Variant: Works in both the Problem DB and the Test DB
Code:
SELECT [Metric1] + [Metric2] AS Result FROM [TESTTable] WHERE [ID]='03';
I don't know why this is happening. I also checked my VBA reference library. Nothing labeled as "Missing". Below is a list that I'm using:
1. Visual Basic For Applications
2. Microsoft Access 15.0 Object Library
3. OLE Automation
4. Microsoft Office 15.0 Access database engine Object Library
Does anyone know what the issue is? I've tried to include all of the information that I can think of.
Thanks,
CoffeeFunnel