Results 1 to 5 of 5
  1. #1
    CoffeeFunnel is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    12

    Weird Error, Not Sure, Disguised as Error 3075

    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

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Parens in the first query don't seem right, try:

    SELECT IIf([Metric1] IS NULL OR LEN([Metric1])=0, 0, [Metric1]) + IIf([Metric2] IS NULL, 0, [Metric2]) AS Result FROM [TESTTable] WHERE [ID]='03';

    The second SQL you show should fail everywhere because of missing () for the Nz function.

    Neither of which explains not recognizing functions.

    You have the same libraries in both dbs?

    Have you run Compact & Repair?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    CoffeeFunnel is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    12
    Hi June,

    Thanks for taking a look. Yeah, the I forgot the () for the NZ in the example; but the actual query has them. Both DBs have the same library. I've run Compact & Repair a few times and it didn't work. I also forgot to mention that the DB is located on an external hard drive.

    Thanks

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    It used to work from that drive? What happens if you run db from another location? Another computer?

    DB is not split?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    CoffeeFunnel is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    12
    Hi June,

    It just started working, but this has happened before. Database is split and has reliably worked about 99% of the time. This is the only issue with the environment. I tried it from another computer. I had to re-link the tables, and it still didn't work. I then used compact and repair, and it started working. And, it is now up and running on the original computer. Ughhhhh, this one is one I really don't get. Maybe access is just being finicky.

    But, any solid answer on why this is happening would be helpful. I know it's going to happen again.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 01-04-2016, 09:40 AM
  2. Replies: 2
    Last Post: 09-10-2014, 11:30 AM
  3. Replies: 11
    Last Post: 05-01-2014, 11:56 AM
  4. Replies: 3
    Last Post: 03-05-2013, 11:17 AM
  5. Replies: 6
    Last Post: 05-30-2012, 12:32 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums