Results 1 to 10 of 10
  1. #1
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    479

    Problem copying Table

    My DoCmd.CopyObject is failing with error


    3709
    The search key was not found in any record.

    I've proved this to the table itself as an older version if it copies ok
    I did at one time get the message One or more of the newly created objects contain a data type that isn't compatible with earlier versions of Microsoft Access.
    This may be it as the target db is an mdb, but there's no accdb specific datatypes (that I can find).
    And it does copy if I remove all the fields except the id autonumber.
    Anyone have any debugging tips where I might see what the problem is ?
    Thanks.

    I have done a Compact & Repair. No change.
    Last edited by Middlemarch; 08-27-2023 at 03:01 AM. Reason: add Ps

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,127
    That error usually indicates corruption in one or more records identify the corrupt record(s) and copy the table without those
    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!

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    removed - somehow ended up with a more or less duplicate post.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    Try a compact/repair?
    Also, make sure you don't have an index on a memo (long text) field.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,127
    Access won't allow you to create an index on a long text field, at least not in current versions.
    If it were ever possible, it would indeed be a bad idea.
    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!

  6. #6
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    Access won't allow you to create an index on a long text field, at least not in current versions.
    Are you sure?

    Click image for larger version. 

Name:	1MemoIndex.jpg 
Views:	18 
Size:	28.0 KB 
ID:	50685
    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 MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,127
    Interesting.
    I was sure when I answered!
    I had checked it earlier using the Indexes item on the Table Design ribbon & it wouldn't let me do so. In fact any long text fields aren't listed there & it won't let you write them in.

    However, you are correct that it will let you index long text fields from the field property list! Very odd!
    I will follow up with a member of the Access team!
    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!

  8. #8
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    Well if it turns out to be an anomaly, can you convince them to name it the Micron Anomaly?
    BTW, I was able to save that change to the table design.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  9. #9
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,127
    Its definitely an anomaly.
    I've had an initial response from the Access team and will let you know the outcome when I can tell you more.

    According to this help article, https://support.microsoft.com/en-us/...s%20to%20index, you can index long text fields though not OLE, calculated or attachment fields.
    Nevertheless, as we both agree, its not generally a good idea to do so.
    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!

  10. #10
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,127
    I've now had a more detailed reply from Microsoft.

    The Access team has acknowledged the inconsistency in behavior regarding indexes in long text fields and will make a decision on the best way of addressing that inconsistency.

    Whether they do so by blocking indexing from the property pane, or by allowing indexing in the index dialog will require further investigation.
    In the meantime, the previous advice given (in this thread) is worth reiterating – do not create an index on a long text field
    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. Replies: 3
    Last Post: 02-24-2023, 02:39 PM
  2. Copying records from one table to another
    By willster88 in forum Access
    Replies: 2
    Last Post: 03-22-2014, 01:57 PM
  3. Copying Table Headers
    By djohnson1 in forum Access
    Replies: 1
    Last Post: 01-09-2014, 10:25 AM
  4. Replies: 5
    Last Post: 12-08-2011, 10:52 AM
  5. Replies: 1
    Last Post: 06-08-2011, 02:58 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