Error : You can’t go to specified record

parth00

Registered User.
Local time
Yesterday, 20:37
Joined
Sep 23, 2005
Messages
25
I am getting following error “You can’t go to specified record”

I am validating Employee ID entered in textbox Employee_ID_Text. If I find Employee ID in the table, I load all relevant employee information in Form, to do so I call “Load_New_Employee_data” function. It works fine, but some how non of the buttons work (Next, Prev, Add New Record) and I get above listed error.

Here is my code:

Private Sub Employee_ID_Text_BeforeUpdate(Cancel As Integer)
With Me.RecordsetClone
.FindFirst "Employee_Id = " & Me.Employee_ID_Text
If .NoMatch Then
Cancel = False
Clena_up_Data
DoCmd.GoToRecord , , acNewRec
Else
Cancel = False
Load_New_Employee_Data
End If
End With
End Sub

I think when I load new Employee Data using custom function (Load_New_Employee_Data), recordset still points to old record… Do any one know how to fix it?

Thanks in advance
 
Last edited:

Users who are viewing this thread

Back
Top Bottom