G
Guest
what is the appropriate way to manage an unlinked subform?
I have a tab on a form that serves as an independent search page for data.
But this page should in no way be related to whatever record is on another
tab.
So I have the Parent and child links set to None.
On this particular tab for searches, I have a combobox that I use to filter
out values and a subform is filtered based on a value in the combo box that
show the search results.
But I notice that after choosing a couple of values and seeing strange
results, that the subform actually becomes linked, to the ID field of the
form.
This is my code
================================================
Select Case Me.cmbSearchField.Value
Case "*ALL"
Me.ResultSub.Form.RecordSource = "qrySearchAll"
Me.ResultSub.Form.FilterOn = False
Case Else
Me.ResultSub.Form.RecordSource = "qrySearchAll"
Me.ResultSub.Form.Filter = "[Field Name] = '" & Me.cmbSearchField &
"'"
Me.ResultSub.Form.FilterOn = True
End Select
End Sub
===========================================
Seems pretty straightforward, but when after I select a couple of values,
the subform becomes linked...
I have a tab on a form that serves as an independent search page for data.
But this page should in no way be related to whatever record is on another
tab.
So I have the Parent and child links set to None.
On this particular tab for searches, I have a combobox that I use to filter
out values and a subform is filtered based on a value in the combo box that
show the search results.
But I notice that after choosing a couple of values and seeing strange
results, that the subform actually becomes linked, to the ID field of the
form.
This is my code
================================================
Select Case Me.cmbSearchField.Value
Case "*ALL"
Me.ResultSub.Form.RecordSource = "qrySearchAll"
Me.ResultSub.Form.FilterOn = False
Case Else
Me.ResultSub.Form.RecordSource = "qrySearchAll"
Me.ResultSub.Form.Filter = "[Field Name] = '" & Me.cmbSearchField &
"'"
Me.ResultSub.Form.FilterOn = True
End Select
End Sub
===========================================
Seems pretty straightforward, but when after I select a couple of values,
the subform becomes linked...