Results 1 to 7 of 7
  1. #1
    dollygg is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    73

    reserve error (-3034) and error 2950

    I have an old .mdb file and try to run it in MS365. I am getting a reserve error (-3034) and then error 2950 for each of the query I run for the first time. The second time it went through. If there is 6 SQL query behind the macro button , I will see the error pops up 6 times.



    I did some search, it says the issue is related with trust setting. I refresh the trust setting but he problem persist.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    check yr trust settings
    check in VBE (alt-f11) tools, references: that you don't have any checked items with label: MISSING
    make sure all DECLARE statements have PTRSAFE


    Code:
    #If Win64 Then      'Public Declare PtrSafe Function
         Private Declare PtrSafe Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, ByVal bRevert As Long) As LongPtr
     #Else
          Private Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, ByVal bRevert As Long) As Long
    #End If

  3. #3
    dollygg is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    73
    Reference library is refreshed. PTRSAFE was added. Trust setting is refresh. However, the same problem occur. The make table /update /insert into SQL query always fail on the first run.

  4. #4
    chris-smith is offline Novice
    Windows 10 Access 2016
    Join Date
    Jan 2023
    Posts
    10
    Hi,

    Try doing the following things-
    1. Add the location of your database file to the list of trusted locations in the Trust Center settings.
    2. Try to Compact and Repair your database as it may sometimes fix such issues.
    3. If your database has external libraries or references, make sure they are up-to-date and properly configured.
    4. Try saving your database in .accdb format and then run it.


    If this doesn't fix the problem, please provide more information.

    Best Regards.

  5. #5
    dollygg is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Jul 2009
    Posts
    73
    When I click on the "Trusted Locations" , then "Trusted New location" , I saw the path "C:\Program Files\Microsoft Office\root\Office16\ACCWIZ". Is this path correct or should I select the path where the database was located?

  6. #6
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    You need to keep the db in a trusted location. If you don't have one that suits you, create a new one - perhaps the folder where the db is located now. If you pick a parent folder (e.g. MyDatabases) and choose the setting to include subfolders, then every subfolder you create under MyDatabases will be trusted. This is something you can google if you want more information such as pictures or videos.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    I agree about trusted locations being the likely cause.

    For info, converting APIs to 64-bit wasn't the issue. If code needs converting for 64-bit, you will get a clear warning telling you that.
    in any case just adding PtrSafe isn't enough to make all APIs work in 64-bit and the code example given in post #2 wouldn't work in that bitness anyway as it is incorrect.

    I wrote an article on reserved errors at Feedback requested: There is no message for this error (accessforever.org).

    As the article states the Access team want examples of such errors to help pin down the cause.
    Reserved error -3034 is new to me so if you can upload the old MDB file I will test and forward it. Remove any sensitive data first but check the reserved error still occurs
    Also error 2950 is a non-specific error. What exactly was the error description you saw for this?
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

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

Similar Threads

  1. Cannot get rid of a 2950 error
    By ineuw in forum Access
    Replies: 4
    Last Post: 06-17-2016, 03:09 PM
  2. Error number 2950
    By azhar2006 in forum Forms
    Replies: 1
    Last Post: 07-08-2014, 03:34 PM
  3. Replies: 4
    Last Post: 03-07-2013, 12:27 AM
  4. Access Error 2950! Help!
    By qwerty1 in forum Access
    Replies: 3
    Last Post: 09-06-2012, 11:35 AM
  5. error 2950 out of the blue
    By kroenc17 in forum Access
    Replies: 1
    Last Post: 10-08-2010, 10:00 AM

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