runtime error 2105

gizmogeek

Registered User.
Local time
Today, 15:50
Joined
Oct 3, 2007
Messages
95
I didn't create this .accdb. I've been asked to help fix the error but when I open the .accdb it gives me error 2105 upon opening it. I've tried decompile/compile (grayed out), compact and repair (which does nothing).

Any/all help will be appreciated.
 
2105 means you can't go to that record.

So, if you have a macro or VBA which is attempting to move to a new record and it is already on a new record, then that error can occur. You can put in error handling to stop that or you can fix the code that is doing it.
 
Can you tell me how to fix it. It's been a long time since I've worked with MS Access. When I hit debug on the error it just shows me
Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec

End Sub
 
You can fix by using:

Code:
Private Sub Form_Load()
[B][COLOR=red]If Not Me.NewRecord Then[/COLOR][/B]
   DoCmd.GoToRecord , , acNewRec
[B][COLOR=red]End If[/COLOR][/B]

End Sub
 
Thanks Bob! However, I still get the same error and if I run debug it still stops on DoCmd.GoToRecord , , acNewRec
 
Thanks Bob! However, I still get the same error and if I run debug it still stops on DoCmd.GoToRecord , , acNewRec

Is your DATA ENTRY property set to YES by chance? If so, you can delete that go to record code (with the other part I gave you as well).
 
Hey Bob baby steps. How do I check the data entry property and will I need all of the code you sent or just go back to the old after I delete the "yes"

Thanks!!
 
Hey Bob baby steps. How do I check the data entry property and will I need all of the code you sent or just go back to the old after I delete the "yes"

Thanks!!
1. Open the form in Design View.
2. Go to the Properties and on the DATA tab, look for DATA ENTRY.


You would delete the entire code for the Load event.
 
Okay. There is nothing in the properties but I did delete the entire code and it opens without error.
 
Shouldn't it open to a blank sheet where I can put in new data? I don't see anywhere to add new.
 
Now when I open it I can go into properties. Before it wouldn't come up in this view it would just come up with blank properties. The data entry is set to "No".
 
Yes, it was set to "No" already only I couldn't see the full properties until I took the code out. Now it opens without error and I do see records in the form but nowhere to put in new.
 
Yes, it was set to "No" already only I couldn't see the full properties until I took the code out. Now it opens without error and I do see records in the form but nowhere to put in new.

Ah, then your form's RECORD SOURCE may not be Updateable. Check to see that you can modify any existing records.

And if you can modify them, make sure that the form's ALLOW ADDITIONS property is set to YES (also located on the DATA tab of the properties).
 
Okay. I can't modify the records. Allow Additions is set to "YES"

Here is the code on the record source: SELECT Clients.*, [Attachment].FileName FROM Clients;
 
It's a table.

So the only thing I can think of is that the Attachments field is causing you the problem. What happens if you take that out of your record source? Does the form update/add records then?
 
Do I take out just the word Attachments or the whole select statement?
 

Users who are viewing this thread

Back
Top Bottom