Configuration: Main form (no data source), subform on tab control based on table, two subforms on first subform each Child/Master-linked to the primary key of the first subform's table.
The intention is for this tab's first subform and its subordinate subforms be "view only" (no adding, deleting, editing).
Earlier versions did not have these additional two subforms, at which point command buttons were created for a variety of filters (which worked fine). Once I placed the fields in these new subforms (which display as desired and follow the primary key navigation), these filters no longer worked.
Toying around with it, I discovered that if I turned the 3 editing related properties back on, the filters work again; however, I do not want editing available on this form.
Whether I turn off the edit-related properties or set Record Locks to All Records (both of which prevent editing), the filters cannot work.
Is there a solution and correct way to apply filters programmatically to this configuration while having editing of any kind unavailable?
Note: Each of these are simple filters filtering only the primary key of the first subform.
An example of the filter subs used currently:
Currently, all filters are turned off using a single Show All command button. (Later versions may incorporate filter toggle buttons for each one.)
The intention is for this tab's first subform and its subordinate subforms be "view only" (no adding, deleting, editing).
Earlier versions did not have these additional two subforms, at which point command buttons were created for a variety of filters (which worked fine). Once I placed the fields in these new subforms (which display as desired and follow the primary key navigation), these filters no longer worked.
Toying around with it, I discovered that if I turned the 3 editing related properties back on, the filters work again; however, I do not want editing available on this form.
Whether I turn off the edit-related properties or set Record Locks to All Records (both of which prevent editing), the filters cannot work.
Is there a solution and correct way to apply filters programmatically to this configuration while having editing of any kind unavailable?
Note: Each of these are simple filters filtering only the primary key of the first subform.
An example of the filter subs used currently:
Code:
'Filter button 1
Private Sub cmdFinancial_Ins_Click()
On Error GoTo Err_cmdFinancial_Ins_Click
Me.Filter = "[DocumentCategory] = 'FINANCIAL AND INSURANCE'"
Me.FilterOn = True
[labelStopFilteringDocs].ForeColor = vbRed
Exit_cmdFinancial_Ins_Click:
Exit Sub
Err_cmdFinancial_Ins_Click:
MsgBox Err.Description
Resume Exit_cmdFinancial_Ins_Click
End Sub