L
Leslie Isaacs
Hello All
This works:
Me.[Child0].Form.Filter = "[presc_patient] = [Forms]![frm prescriptions
main].[findwhat] "
.... but the problem is, I need the filter to search for records where
[presc_patient] CONTAINS [findwhat] - i.e. not just looking for an exact
match.
So I have tried:
Me.[Child0].Form.Filter = "[presc_patient] = ""*"" & [Forms]![frm
prescriptions main].[findwhat] & ""*"" "
and
Me.[Child0].Form.Filter = "[presc_patient] = ' * ' & [Forms]![frm
prescriptions main].[findwhat] & ' * ' "
.... but both of these return no records - even when the text entered in
[findwhat] is an exact match.
I have also tried:
Me.[Child0].Form.Filter = "[presc_patient] = """ & [Forms]![frm
prescriptions main].[findwhat] & """ "
.... but this only finds exact matches.
I should add that this code is behind a button on a main form (called [frm
prescriptions main]) and is intended to apply to the data displayed on a
subform (called [Child0]) on the main form. The text box [findwhat] is also
on the main form, and [presc_patient] is a field on the subform.
I hope someone can help with this - it's driving me nuts!
Many thanks
Les
This works:
Me.[Child0].Form.Filter = "[presc_patient] = [Forms]![frm prescriptions
main].[findwhat] "
.... but the problem is, I need the filter to search for records where
[presc_patient] CONTAINS [findwhat] - i.e. not just looking for an exact
match.
So I have tried:
Me.[Child0].Form.Filter = "[presc_patient] = ""*"" & [Forms]![frm
prescriptions main].[findwhat] & ""*"" "
and
Me.[Child0].Form.Filter = "[presc_patient] = ' * ' & [Forms]![frm
prescriptions main].[findwhat] & ' * ' "
.... but both of these return no records - even when the text entered in
[findwhat] is an exact match.
I have also tried:
Me.[Child0].Form.Filter = "[presc_patient] = """ & [Forms]![frm
prescriptions main].[findwhat] & """ "
.... but this only finds exact matches.
I should add that this code is behind a button on a main form (called [frm
prescriptions main]) and is intended to apply to the data displayed on a
subform (called [Child0]) on the main form. The text box [findwhat] is also
on the main form, and [presc_patient] is a field on the subform.
I hope someone can help with this - it's driving me nuts!
Many thanks
Les