"You can't go to the specific record" in Access

Hi,
  We have an Access application who run on 2003/2007. When clicking a button the following VBA code is called:

Private Sub Commande87_Click()
On Error GoTo Err_Commande87_Click
    DoCmd.GoToRecord , , acNewRec

Exit_Commande87_Click:
    Exit Sub
Err_Commande87_Click:
    MsgBox Err.Description
    Resume Exit_Commande87_Click
   
End Sub

The application is a MDE. It referes to linked tables (in a MDB) located on a map drive.

Sometimes, it gives the following error: "You can't go to the specific record".

This error shows up depending of the logged on Windows user. But we have 2 administrators who have full access to everything, both accounts are identical, and one does get the error and the other one doesn't. So I really don't understand the reason of this behavior.

thanks for your time and help
Dominic34Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jppintoCommented:
Are both administrators trying to add a new record at the same time? It can be a question of locks to the table that you're trying to go to new record, if one user has the table locked the other user can't go to new record.

jppinto
0
Dominic34Author Commented:
both administrators are trying one after the other, it isn't at the same time.
0
zoom2000Commented:
if the form in edit mode and you call the goto new record , it give an error
so u should call
me.undo
then u can call
DoCmd.GoToRecord , , acNewRec
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

jefftwilleyCommented:
This behavior is not normally an occasional issue. Either you can, or you can't go to a new record depending on the state of the data in the view.
The primary reason you can't add a new record is obvious, you are trying to do so in a Read only scenario.

Form settings can cause this, also the recordset itself.

Is the underlying recordset a query with numerous joins? Do you have the setting "Add New Records" set to false on the form?

J
0
Dominic34Author Commented:
this is really strange. 2 distincts network administrators, both accounts are identical. When the first log on a computer (windows user), and log on the Access application using an administrator (admin of the Access database) account, it works fine. Then, he logout from Windows and the second admin log in, using his account. Both account are identical... And he log in the Access program using the same Access admin account, it give the error "you can't go to the specific record".

what in the hell that could be??!
0
Dominic34Author Commented:
jefftwilley, to answer your questions forms properties are fine, as far as I can say. The error is fired when trying to add a new record on a table (the "DoCmd.GoToRecord , , acNewRec" statement). I don't understand why it works with a specific user and don't with another user, when both account are identical ....
0
jefftwilleyCommented:
Ok, more primative options: :)

Is the database opening from a shortcut on the desktop?

if so, check permissions on the shortcut.

is the Read-Only attribute true?

Are the permissions to the Target directory the same for both admin?

J



0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dominic34Author Commented:
We found out what was happening finally, after 2 weeks of frustrating research! The database is locate on a map drive. The map definition, for a user, used the share name of the map drive "Data$" and the other used the long network path "//serveur/founisseur/data". This error fired when we use the share name but never with the long network path. So, we changed all users who used the share name and it solved the problem!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.