Reserved Error (-1517) when adding new records to table.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • topher23
    Recognized Expert New Member
    • Oct 2008
    • 234

    Reserved Error (-1517) when adding new records to table.

    I have a form in which I build a list of employees who have attended a training course, then populate new records in a training table based on the list. There has never been a problem with this routine, yet this morning I went in to create the list for a training that happenned earlier this week, and when VBA hit the DoCmd.RunSQL statement that inserts the new record into the table, it threw up the message:

    Reserved Error (-1517); There is no message for this error.

    So, I re-built the code to use a recordset instead of the RunSQL function. I just tried to run it and got the same error as soon as it tried to set the value for the first field after the .AddNew statement.

    I have tried and am able to add a record to the table manually, so it's not an issue with permissions on the back-end.

    Anyone have any experience with this? I tried Googling the error and got zip.
  • ChipR
    Recognized Expert Top Contributor
    • Jul 2008
    • 1289

    #2
    It sounds like a field or table name in your front-end doesn't match up with the back-end. Try deleting the table and re-link to it, then double check the names.

    Comment

    • topher23
      Recognized Expert New Member
      • Oct 2008
      • 234

      #3
      Curiouser and curiouser. I still had the form up, so, just for fun, I clicked the "Update" button which runs the aforementioned code, and it worked. All of the new records were added. Maybe this was some sort of transient client-server related issue.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #4
        I always find a Compact & Repair to be a good idea when things get fritzy.

        Relinking all the BE tables isn't a bad idea either (from Chip).

        Comment

        • topher23
          Recognized Expert New Member
          • Oct 2008
          • 234

          #5
          I always set things up to do a Compact & Repair whenever I close one of my databases. Since I'm always working with development copies, it tends to keep things cleaner. I also have an automated process running Compact & Repair and backup on my back-ends weekly.

          The links are working fine - When I added the record manually as mentioned in the OP, I was working from the front-end.

          We had an extended power outage Thursday afternoon that lasted far longer than the UPS on our server, and this error occurred Friday morning, which is why I was thinking it may have been a server issue. Everything is working normally now, so I'll keep an eye out for this error. If I see it come up again, I'll try re-linking the tables, as Chip mentioned.

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32633

            #6
            All in all, it sounds very much as if that was your problem. That's exactly the sort of thing that happens in such cases. I'm sometimes forgetful enough to leave my databases open overnight when the backup kicks in and cuts the network server connections. I get similar issues (I never note the precise details now as I know it recovers itself pretty well if I just close it and reopen it. I guess it helps that there's no danger of any updates going through at the point of cut-off though. I should be clear that I don't recommend this as a way to work. That's just when I'm careless.

            Comment

            Working...