A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Run time error 2105 - can't go to specified record



 
 
Thread Tools Display Modes
  #1  
Old June 14th, 2009, 05:08 PM posted to microsoft.public.access.tablesdbdesign
Bob Waggoner[_2_]
external usenet poster
 
Posts: 80
Default Run time error 2105 - can't go to specified record

Access 2003; XP
When I go into design view on a form and then return to form view, I get a
runtime error 2105 that says I cannot go to the specified record. Why can't I
go to a new record when I load or open a form from design view?

My code is:

Private Sub Form_Load()
On Error GoTo Err_form_load

DoCmd.Maximize
DoCmd.GoToRecord , , acNewRec
Exit_Form_Load:
Exit Sub
Err_form_load:
DoCmd.GoToRecord , , acLast
Resume Exit_Form_Load

The err_Form_load: is desgined to accept the error and move to the last
record. But, despite that, it still gives me the access message and then
reverts to the first record when I say END. (I don't want the user clicking
debug!)

Access 2003 - recently converted from 97.

Any help would be appreciated.
  #2  
Old June 14th, 2009, 05:14 PM posted to microsoft.public.access.tablesdbdesign
Bob Waggoner[_2_]
external usenet poster
 
Posts: 80
Default Run time error 2105 - can't go to specified record

Nevermind. I discovered my error. The underlying query was not set up for new
records. Two tables were joined with a one-to-one relationship.


"Bob Waggoner" wrote:

Access 2003; XP
When I go into design view on a form and then return to form view, I get a
runtime error 2105 that says I cannot go to the specified record. Why can't I
go to a new record when I load or open a form from design view?

My code is:

Private Sub Form_Load()
On Error GoTo Err_form_load

DoCmd.Maximize
DoCmd.GoToRecord , , acNewRec
Exit_Form_Load:
Exit Sub
Err_form_load:
DoCmd.GoToRecord , , acLast
Resume Exit_Form_Load

The err_Form_load: is desgined to accept the error and move to the last
record. But, despite that, it still gives me the access message and then
reverts to the first record when I say END. (I don't want the user clicking
debug!)

Access 2003 - recently converted from 97.

Any help would be appreciated.

  #3  
Old June 14th, 2009, 09:59 PM posted to microsoft.public.access.tablesdbdesign
tina
external usenet poster
 
Posts: 1,997
Default Run time error 2105 - can't go to specified record

i just tested a two-table query where the tables were joined in a one-to-one
relationship in the Relationships window, with referential integrity
enforced. i was able to open the Select query and add new records,
regardless of whether the query join was a LEFT JOIN, INNER JOIN, or RIGHT
JOIN between the parent table and the child table (even a one-to-one
relationship has a parent and child).

i'm thinking there was something else preventing your query from being
updateable.

hth


"Bob Waggoner" wrote in message
...
Nevermind. I discovered my error. The underlying query was not set up for

new
records. Two tables were joined with a one-to-one relationship.


"Bob Waggoner" wrote:

Access 2003; XP
When I go into design view on a form and then return to form view, I get

a
runtime error 2105 that says I cannot go to the specified record. Why

can't I
go to a new record when I load or open a form from design view?

My code is:

Private Sub Form_Load()
On Error GoTo Err_form_load

DoCmd.Maximize
DoCmd.GoToRecord , , acNewRec
Exit_Form_Load:
Exit Sub
Err_form_load:
DoCmd.GoToRecord , , acLast
Resume Exit_Form_Load

The err_Form_load: is desgined to accept the error and move to the last
record. But, despite that, it still gives me the access message and then
reverts to the first record when I say END. (I don't want the user

clicking
debug!)

Access 2003 - recently converted from 97.

Any help would be appreciated.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.