J
jaf
I have a subform that is filtered based on combo boxes on the main form.
When I programmatically remove the filter and click on a record in the
subform to make it the current record it returns to the first record on the
subform. If I click a second time on the same record it becomes the current
record. If I want to select a different record I have to repeat the two-click
process to make it current.
Below is my code to remove the filter and to synch the main and subforms.
The synch works fine after I remove the filter. But when I select a different
record on the subform it makes it the current record on the main form but
then the subform reverts back to first record again.
Private Sub cmdAllPts_Click()
Forms![frmHeartInitial]![frmMainPtListsubform].Form.Filter = ""
Forms![frmHeartInitial]![frmMainPtListsubform].Form.FilterOn = False
[cboPtStatus] = ""
[cboTxStatus] = ""
Call SynchParentWithSub
End Sub
Private Sub SynchParentWithSub()
Forms![frmHeartInitial].RecordsetClone.FindFirst "[MRN] = " & Me![MRN]
Forms![frmHeartInitial].Bookmark =
Forms![frmHeartInitial].RecordsetClone.Bookmark
End Sub
This code works fine in the Access 97 version of my application but I have
the problem detailed above after converting the application to Access 2003.
Any ideas as to why this is happening?
When I programmatically remove the filter and click on a record in the
subform to make it the current record it returns to the first record on the
subform. If I click a second time on the same record it becomes the current
record. If I want to select a different record I have to repeat the two-click
process to make it current.
Below is my code to remove the filter and to synch the main and subforms.
The synch works fine after I remove the filter. But when I select a different
record on the subform it makes it the current record on the main form but
then the subform reverts back to first record again.
Private Sub cmdAllPts_Click()
Forms![frmHeartInitial]![frmMainPtListsubform].Form.Filter = ""
Forms![frmHeartInitial]![frmMainPtListsubform].Form.FilterOn = False
[cboPtStatus] = ""
[cboTxStatus] = ""
Call SynchParentWithSub
End Sub
Private Sub SynchParentWithSub()
Forms![frmHeartInitial].RecordsetClone.FindFirst "[MRN] = " & Me![MRN]
Forms![frmHeartInitial].Bookmark =
Forms![frmHeartInitial].RecordsetClone.Bookmark
End Sub
This code works fine in the Access 97 version of my application but I have
the problem detailed above after converting the application to Access 2003.
Any ideas as to why this is happening?