Error 2105, ADP and SQL Server

  • Thread starter Gemini13 via AccessMonster.com
  • Start date
G

Gemini13 via AccessMonster.com

I'm in the middle of migrating an mdb file to adp and have migrated the
tables over to SQL Server 2000

A curious thing is happening for which I have no explanation.

On my main form, I have a button that the user clicks to start a new
record. Very simply, the code is

DoCmd.GoToRecord , , acNewRec

whereas in mdb world, this was no problem, adp/SQL Server doesn't like it,
and it throws 2105 "You can't go to the specified record".

why? and how do i fix it?
 
S

Sylvain Lafontaine

Usually, there is not problem with DoCmd.GoToRecord , , acNewRec under ADP
and I use it myself.

Make sure that a primary key has been defined and returned from the
RecordSource and that the property Allow Additions is set to true. Other
things, like an error on the current record, can also have the effect of
blocking this code.

S. L.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top