Results 1 to 10 of 10
  1. #1
    mlrucci is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2018
    Posts
    202

    error 3251 "Operation is not supported for this type of object"

    Good afternoon, I am stuck. I have multiple forms with buttons containing vba to import information from an excel spreadsheet into a table in access. Works great. For some reason, when I move the db over to a new db to keep it "cleaned up", I received the error 3251 "Operation is not supported for this type of object". This occurs after the following:


    1. Copy the DB to new DB
    2. import information from excel spreadsheet to access table and works.
    3. Attempt to import via button/vba from any other form (multiple forms with buttons for different imports) from excel spreadsheet to a different table and I received the error code.

    It is acting like once I import data to a table, it corrupts the DB. Unable to find helpful information on the error code. It works great in the original DB. Any suggestions except the obvious of not transferring it to a new DB. Access has a tendency to be a bit quirky and would like to keep it cleaned up.
    I have attempted to Compact and Repair without resolution either.

    Thanks in advance for the help

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,920
    What do you mean by 'copy' - SaveAs or copy/paste in Windows? You are using Access 64-bit?
    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
    mlrucci is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2018
    Posts
    202
    Sorry, wrong word. I don't copy the db. I am importing it into a new db. I am using 32 bit

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,920
    Why do you feel you need to do import to 'clean it up'?

    The error is triggered when and with what object?
    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
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    If you decompile your existing database it pretty much performs the same as copying it into a new blank one.

    Full instructions here: https://www.fmsinc.com/MicrosoftAcce.../Decompile.asp

    However you problem is probably caused by a reference missing from the new file.
    Goto the VBA editor and click Tools¬References.
    Compare what you have and the order they are in between the old and new versions.

    Finally, I'm in agreement with June, you should only be creating an new DB as a matter of last resort, not as a regular maintenance task.
    That would tend to indicate something is not right in your database if corruption is occurring that often.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  6. #6
    mlrucci is offline Competent Performer
    Windows 7 64bit Office 365
    Join Date
    Apr 2018
    Posts
    202
    June and Minty, Thank you for your responses. The decompile didn't correct the problem, and the references are in the same order. At this point, the original program is not having issues. It became a common practice for me to do this over the years as Access was very glitchy, and before I put the program live and split, I would import it into a new db. You are probably right that it is unnecessary. In the end, I am not sure why this is happening. Was just looking for a solution. As you know, programing is like a puzzle, hard to put it down when there is a problem. Thanks again

  7. #7
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    I think we would need to see the code being used and the point at which it errors?
    Without that we will be shooting in the dark.

    Maybe you could upload one spreadsheet and the relevant parts of the DB that is failing for us to have a look at?
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  8. #8
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Perhaps when things are copied over to a new db, no thought is being given to References so one or more are missing?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  9. #9
    mlrucci is offline Competent Performer
    Windows 7 64bit Office 365
    Join Date
    Apr 2018
    Posts
    202
    So, I am not sure what is going on, but my original db just crashed and it automatically saved the db to Database1 and deled the original. I thought I would get a shot at trying to see if the system would move the objects to new database as I was concerned that again it is corrupt. This happens sometimes when I attempt to make changes to a form or report in Layout. I opened a new db and imported all the objects. Added the appropriate references, decompiled and did CR. Without making any further adjustments, it is now working great. On another note, I did check the references again because I added 2 of them for the picker in for the appropriate excel spreadsheet import, and it was correct for both the references and the order of the references. Currently not having any problems. Go figure. I would like to thank everyone for their input! It is just bizarre

  10. #10
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    As a further piece of advice turn off the Name AutoCorrect options, they are known to lead to corruption in certain circumstances.
    They are in Options ¬ Current Database in the File Menu.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

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

Similar Threads

  1. Runtime Error 3251 object not supported
    By avanduyvenbode in forum Programming
    Replies: 2
    Last Post: 10-18-2016, 09:54 AM
  2. Replies: 3
    Last Post: 02-06-2015, 03:22 PM
  3. Replies: 1
    Last Post: 09-04-2014, 10:09 AM
  4. Operation is not supported for this type of object error
    By CementCarver in forum Programming
    Replies: 4
    Last Post: 06-17-2013, 02:04 PM
  5. Object not supported "ERROR"
    By Casper2012 in forum Forms
    Replies: 1
    Last Post: 08-24-2011, 06:31 PM

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