I have a series of tabbed forms (frmA, frmB, frmC) in my Access 2002 mdb and use DAO to move to the current record when the user goes to a different tab. For example, if the user is viewing a record in frmA, then changes tabs to go to frmB, I move frmB to the current record by calling this sub:
Public Sub SyncForms()
Dim lngEid As Long
lngEid = Form_frmA.Entity_ID
Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
rst.FindFirst ("Entity_ID=" & lngEid)
If rst.NoMatch Then
MsgBox ("Can't find Entity ID " & Forms!frmMain!frmCn!Entity_ID), , "Error A84"
Me.Bookmark = rst.Bookmark
Set rst = Nothing
The problem -- Invalid Object... -- occurs after updating the record in frmB.
How can I avoid this? Should I Update the recordset? Or, since all the forms are open (since they are tabs) is there a better way to move around? Any help is greatly appreciated!