I have a variant question on an issue that has been asked before.
I have a main form that allows the user to locate an individual, and embedded within that main form is a subform that returns transactions associated with the selected individual. These individuals may be tagged as "inactive" for various reason by checking a checkbox entitled "Inactive" on the Main Form record. When the form loads, a filter is set to load only those indivduals whose "Inactive" field is set to False.
I'm attempting to add a command button that will toggle back and forth between the "Inactive" individuals being (A) excluded from the form and (B) included in the form. The command button is named "cmdShowInact", and there's a combo box ("cmbLkpMuse") on the main form that populates with all available Main Form records (Individuals, not transactions) for search and locate. I'm using the caption on the button when pressed to determine whether to toggle one way or the other. When the command button is pressed, the bare bone code is as follows:
If Me.cmdShowInact.Caption = "Show Inactives" Then
Me.FilterOn = False
Me.cmbLkpMuse.RowSource = "SELECT [musicians].[musicianID], ....... "
Me.cmdShowInact.Caption = "Show Actives Only"
DoCmd.GoToRecord , , acFirst
Pressing the button results in the Fatal Failure message that Access has encountered a problem and needs to close. Upon further review through the debugger, it appears that when the processing reaches the line "DoCmd.GoToRecord , , acFirst", the Run Time Error 2499, "Can't go to first rec in Design view" is fired; I'm guessing that it is that error that is in turn firing off the Fatal Shutdown Error.
Based on the previous comments regarding Error 2499, I'm guessing that the problem must be in the attempt to marry transactions in the subform with the record selected in the Main Form, but beyond that I'm not sure how to proceed.
As always, my friends, there is great wisdom out there among you all, and I hope you have some good ideas for me to try.
Many thanks ...