I am getting this error and somehow I can’t figure out what is wrong. All I am trying to do is select Employee_ID (Primary Key) from combo box (Employee_ID_Text).
If employee id is found load the employee information.
Error Message:
Runtime Error: 3022”
Changes to you requested to the were not successful because they will create duplicate values in index, primary key or Relationship.
Here is my code….I get above error when VB executes Me.Bookmark = Rs.Bookmark.
Private Sub Employee_ID_Text_AfterUpdate()
Dim Rs As Object
Set Rs = Me.Recordset.Clone
Rs.FindFirst "Employee_Id = " & Str(Me.Employee_ID_Text)
If Rs.NoMatch Then
MsgBox " Record Not found"
Else
Me.Bookmark = Rs.Bookmark
End If
Rs.Close
End Sub
Please comment
If employee id is found load the employee information.
Error Message:
Runtime Error: 3022”
Changes to you requested to the were not successful because they will create duplicate values in index, primary key or Relationship.
Here is my code….I get above error when VB executes Me.Bookmark = Rs.Bookmark.
Private Sub Employee_ID_Text_AfterUpdate()
Dim Rs As Object
Set Rs = Me.Recordset.Clone
Rs.FindFirst "Employee_Id = " & Str(Me.Employee_ID_Text)
If Rs.NoMatch Then
MsgBox " Record Not found"
Else
Me.Bookmark = Rs.Bookmark
End If
Rs.Close
End Sub
Please comment