L
Leslie Isaacs
Hello All
I have a subform [frm details] that opens in datasheet view on a main form
[frm main].
The subform has a field called [patient] and another field called [doctor].
The main form has an unbound text box called [findpatientordoctor].
I want to have a button on the main form that, when clicked, will filter the
subform data such that only records that contain the [findpatientordoctor]
string either in the field [patient] or in the field [doctor] are displayed.
I also need another button (to be labelled "Show All") that will remove the
filter.
I have tried to come up with the correct code, but cannot get it right: hope
someone can help.
Many thanks
Leslie Isaacs
I have a subform [frm details] that opens in datasheet view on a main form
[frm main].
The subform has a field called [patient] and another field called [doctor].
The main form has an unbound text box called [findpatientordoctor].
I want to have a button on the main form that, when clicked, will filter the
subform data such that only records that contain the [findpatientordoctor]
string either in the field [patient] or in the field [doctor] are displayed.
I also need another button (to be labelled "Show All") that will remove the
filter.
I have tried to come up with the correct code, but cannot get it right: hope
someone can help.
Many thanks
Leslie Isaacs