Form Filters

wallacealeco

Registered User.
Local time
Today, 16:17
Joined
Sep 7, 2011
Messages
23
Hi, I have a continuous form, fed by a query. In the form header is a textbox with the following code attached to the 'On Change' event. The variable searchtxt1 contains the value of the textbox.

DoCmd.ApplyFilter , "[surname] like '" & searchtxt1 & "*'"

This works well and filters the list as the user enters text. I have 2 such forms, 'Drivers' and 'Patients'. I thought I would combine them as sub forms on an Unbound main form. However, when they are used as subforms I get the following error.

The action or method is invalid because the Form or report isn't bound to a table or query.

Any thoughts please?
 
I would use something like:

Form_F_Orders.Form.Filter = "State='" & Me.State_Combo & "'"
Form_F_Orders.Form.Filteron = True
 
thanks Ken. That works just fine.
 

Users who are viewing this thread

Back
Top Bottom