Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-05-2012, 12:31 PM   #1
gizmogeek
Newly Registered User
 
Join Date: Oct 2007
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
gizmogeek is on a distinguished road
runtime error 2105

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.

gizmogeek is offline   Reply With Quote
Old 11-05-2012, 12:48 PM   #2
boblarson
Smeghead
 
boblarson's Avatar
 
Join Date: Jan 2001
Location: Oregon, USA
Posts: 32,068
Thanks: 97
Thanked 1,811 Times in 1,573 Posts
boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold
Re: runtime error 2105

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.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
boblarson is offline   Reply With Quote
Old 11-05-2012, 12:53 PM   #3
gizmogeek
Newly Registered User
 
Join Date: Oct 2007
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
gizmogeek is on a distinguished road
Re: runtime error 2105

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

gizmogeek is offline   Reply With Quote
Old 11-05-2012, 01:05 PM   #4
boblarson
Smeghead
 
boblarson's Avatar
 
Join Date: Jan 2001
Location: Oregon, USA
Posts: 32,068
Thanks: 97
Thanked 1,811 Times in 1,573 Posts
boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold
Re: runtime error 2105

You can fix by using:

Code:
Private Sub Form_Load()
If Not Me.NewRecord Then
   DoCmd.GoToRecord , , acNewRec
End If

End Sub
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
boblarson is offline   Reply With Quote
Old 11-05-2012, 01:10 PM   #5
gizmogeek
Newly Registered User
 
Join Date: Oct 2007
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
gizmogeek is on a distinguished road
Re: runtime error 2105

Thanks Bob! However, I still get the same error and if I run debug it still stops on DoCmd.GoToRecord , , acNewRec
gizmogeek is offline   Reply With Quote
Old 11-05-2012, 01:12 PM   #6
boblarson
Smeghead
 
boblarson's Avatar
 
Join Date: Jan 2001
Location: Oregon, USA
Posts: 32,068
Thanks: 97
Thanked 1,811 Times in 1,573 Posts
boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold
Re: runtime error 2105

Quote:
Originally Posted by gizmogeek View Post
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).
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
boblarson is offline   Reply With Quote
Old 11-05-2012, 01:23 PM   #7
gizmogeek
Newly Registered User
 
Join Date: Oct 2007
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
gizmogeek is on a distinguished road
Re: runtime error 2105

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!!

gizmogeek is offline   Reply With Quote
Old 11-05-2012, 01:28 PM   #8
boblarson
Smeghead
 
boblarson's Avatar
 
Join Date: Jan 2001
Location: Oregon, USA
Posts: 32,068
Thanks: 97
Thanked 1,811 Times in 1,573 Posts
boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold
Re: runtime error 2105

Quote:
Originally Posted by gizmogeek View Post
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.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
boblarson is offline   Reply With Quote
Old 11-05-2012, 01:39 PM   #9
gizmogeek
Newly Registered User
 
Join Date: Oct 2007
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
gizmogeek is on a distinguished road
Re: runtime error 2105

Okay. There is nothing in the properties but I did delete the entire code and it opens without error.
gizmogeek is offline   Reply With Quote
Old 11-05-2012, 01:41 PM   #10
gizmogeek
Newly Registered User
 
Join Date: Oct 2007
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
gizmogeek is on a distinguished road
Re: runtime error 2105

Shouldn't it open to a blank sheet where I can put in new data? I don't see anywhere to add new.
gizmogeek is offline   Reply With Quote
Old 11-05-2012, 01:43 PM   #11
boblarson
Smeghead
 
boblarson's Avatar
 
Join Date: Jan 2001
Location: Oregon, USA
Posts: 32,068
Thanks: 97
Thanked 1,811 Times in 1,573 Posts
boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold
Re: runtime error 2105

Quote:
Originally Posted by gizmogeek View Post
Shouldn't it open to a blank sheet where I can put in new data? I don't see anywhere to add new.
So DATA ENTRY was set to NO already?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
boblarson is offline   Reply With Quote
Old 11-05-2012, 01:43 PM   #12
gizmogeek
Newly Registered User
 
Join Date: Oct 2007
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
gizmogeek is on a distinguished road
Re: runtime error 2105

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".
gizmogeek is offline   Reply With Quote
Old 11-05-2012, 02:04 PM   #13
gizmogeek
Newly Registered User
 
Join Date: Oct 2007
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
gizmogeek is on a distinguished road
Re: runtime error 2105

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.
gizmogeek is offline   Reply With Quote
Old 11-05-2012, 02:13 PM   #14
boblarson
Smeghead
 
boblarson's Avatar
 
Join Date: Jan 2001
Location: Oregon, USA
Posts: 32,068
Thanks: 97
Thanked 1,811 Times in 1,573 Posts
boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold boblarson is a splendid one to behold
Re: runtime error 2105

Quote:
Originally Posted by gizmogeek View Post
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).
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
boblarson is offline   Reply With Quote
Old 11-05-2012, 02:23 PM   #15
gizmogeek
Newly Registered User
 
Join Date: Oct 2007
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
gizmogeek is on a distinguished road
Re: runtime error 2105

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;
gizmogeek is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 2105 -1, , New doddy88 Forms 4 08-14-2012 07:03 PM
Runtime 2105 on subform olly Forms 4 09-09-2007 10:40 AM
Why I get Error 2105? Chipcom General 1 08-04-2007 04:05 AM
RunTime Error 2105 Chipcom General 1 06-15-2007 05:35 AM
error no 2105 TurboDieselOne Forms 0 06-24-2004 10:25 AM




All times are GMT -8. The time now is 05:41 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World