I have a subform ([TrainingQry3 subform]) that on focus inputs the value into an invisible text box. Then I have this text box linked using master/child to another subform ([TrainingTopics subform]) to filter it. Inside this subform I have a Yes/No box that indicates if I want this topic to not apply to this particular employee. If I check the box Yes, indicating that I don't want this employee to be trained on this topic then I have a conditional format that will gray on the row. I wanted to also have the subform requery so that all the grayed out rows are on the bottom. Also, I have a vba code that requeries the subform and brings me back to the saw record using the bookmark function.
The problem I'm having is that when I click Yes and the subform requeries and the row becomes grayed out, Access crashes.
Does anyone know why this is?
Here is the code with the Bookmark function:
Private Sub NATopic_AfterUpdate()
strNABookmark = Forms![Employees Form].[TrainingQry3 Subform].Form.Bookmark
If Me.Dirty Then Me.Dirty = False
Forms![Employees Form].[TrainingQry3 Subform].Form.Requery
Forms![Employees Form].[TrainingQry3 Subform].Form.Bookmark = strNABookmark
Forms![Employees Form].[TrainingQry3 Subform].Form.Category.SetFocus
Forms![Employees Form].[TrainingQry3 Subform2].Form.Requery
End Sub