From: Salad on 7 May 2010 10:46
> I am working in MS access 2007 , I have a subform contains two fields
> customer name (type text) and customer selected (type yes/no) , one
> these customer has a value 'ALL' , the question is :
> is there a way when i click in the customer selected field that has
> the customer name 'ALL' , to select all the records of the customer
> (mean add tic in all customer selected) ?
> any one could tell me how to do that ?
Usually I have a form/subform. The header of the main form may have a
field to filter on. I may have a default of all records. Then when it
changes I do something in the AfterUpdate event like
Dim strF as String
If strF <> "All" then strF = "CustomerType = " & Me.YourFldName
Me.Filter = strF
Me.FilterOn = (strF <> "")
You can refer to forms, instead of Me, if referring to subforms like
Forms!YourMainFormName!YourSubFormName.Form.Filter = ...
and for a field
I'm not sure why you'd have the customer name and type in a subform to
select all (what) records of a customer.
Prev: Hyperion Financial Management (HFM) , Jersey city, NJ
Next: QA Consultant , Richmond, VA