Hi all
I am working on this database for a few days already. Everything went as usual except that 2 days ago I had for the first time the 'run-time error 2105' when loading a form using the following code:
I have used this hundreds of times. When the form opens go to New Rec and set focus on the Close button.
Only that now I got the 'run-time error 2105: You can't go to the specified record'.
And if I comment out the Docmd.GoToRecord line it gives 'run-time error 2950: Reserved Error' on the SetFocus line...
I have decompiled the database, and used it with MSAccess 2013 and 2016. Paradoxically it works fine on 2007!!! Just my client has 2013.
And I have done the following so far:
With another test version it was enough to disable some fields in the form for the error to pop-up after Design View - Form View cycle.
I am uploading one of the many versions I have created so far. The problematic form is frmClientsExtra and frmClientsNew, obviously different versions of the same Clients form.
There are 2 'Copy of... forms that do not display the error as they were created from scratch.
Sincerely hope you guys can help me.
Many thanks in advance.
Luis
I am working on this database for a few days already. Everything went as usual except that 2 days ago I had for the first time the 'run-time error 2105' when loading a form using the following code:
Code:
Private Sub Form_Load()
DoCmd.GoToRecord , , acNewRec
Me.cmdClose.SetFocus
End Sub
Only that now I got the 'run-time error 2105: You can't go to the specified record'.
And if I comment out the Docmd.GoToRecord line it gives 'run-time error 2950: Reserved Error' on the SetFocus line...
I have decompiled the database, and used it with MSAccess 2013 and 2016. Paradoxically it works fine on 2007!!! Just my client has 2013.
And I have done the following so far:
- recreate the problematic form (it only happens in one specific form, all others are OK) from scratch.
- Start a new database and recreate the tables from scratch, import everything else except the problematic form. Recreate the form from scratch.
- Use different version of Access. It works fine on 2007.
- Use a different machine with different OS. Usually my development environment is W7, tried with W10.
With another test version it was enough to disable some fields in the form for the error to pop-up after Design View - Form View cycle.
I am uploading one of the many versions I have created so far. The problematic form is frmClientsExtra and frmClientsNew, obviously different versions of the same Clients form.
There are 2 'Copy of... forms that do not display the error as they were created from scratch.
Sincerely hope you guys can help me.
Many thanks in advance.
Luis
Attachments
Last edited: