I want to navigate to records on my form, via combo box selection.
In the afterupdate event of my combo box, I have the code:
ID_Index represents the PK of the form's table.
Code works initially. I'm able to navigate to different records. But once I close the database or form, the navigation stops working; rs.NoMatch keeps triggering.
Idk if it helps:
But I have in the form properties, Data Entry = Yes.
Form_Dirty has my save button enabled (Me.cmdSave.Enabled = True). Only when user modifies record does the save button enable, otherwise it stays disabled.
On Form_Open, all fields are disabled and enabled NewRecord_OnClick (when a new record is created).
There's still a few things that maybe worth mentioning, but not sure if any of it is relevant.
In the afterupdate event of my combo box, I have the code:
Code:
Dim rs As DAO.Recordset
If Not IsNull(Me.cboMoveTo) Then
'Save before move.
If Me.Dirty Then
Me.Dirty = False
End If
'Search in the clone set.
Set rs = Me.RecordsetClone
rs.FindFirst "[ID_Index] = """ & Me.cboMoveTo & """"
If rs.NoMatch Then
MsgBox "Not found: filtered?"
Else
'Display the found record in the form.
Me.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End If
End Sub
ID_Index represents the PK of the form's table.
Code works initially. I'm able to navigate to different records. But once I close the database or form, the navigation stops working; rs.NoMatch keeps triggering.
Idk if it helps:
But I have in the form properties, Data Entry = Yes.
Form_Dirty has my save button enabled (Me.cmdSave.Enabled = True). Only when user modifies record does the save button enable, otherwise it stays disabled.
On Form_Open, all fields are disabled and enabled NewRecord_OnClick (when a new record is created).
There's still a few things that maybe worth mentioning, but not sure if any of it is relevant.