Error on double click for adding values

L

Ladi

Dear all,

With the following I tried to enter values on a table
trying to open an existing form for new values which will be used on the
current form:

Private Sub EntiID_DblClick(Cancel As Integer)
DoCmd.OpenForm "Drejtorite"
If Not IsNull(Me.EntiID) Then
DoCmd.GoToRecord acDataForm, "Drejtorite", acGoTo, Me.EntiID
Form_Drejtorite.Text7 = "Korigjim i Enteve"
Else
DoCmd.GoToRecord acDataForm, "Drejtorite", acNewRec
Form_Drejtorite.Text7 = "Hedhje e Entit te ri"
End If
End Sub

but it gives the following error:

Run-time error: '2105'
You con't go to the specific record!

Options: End, Debug, Help

Please tell me how to do that!
 

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

Similar Threads


Top