Question CheckBox on a SubForm, based on a Query, to Toggle Criterias

DREAMERMX

Registered User.
Local time
Yesterday, 21:55
Joined
Aug 14, 2013
Messages
20


Hello!

I have a SubForm "assignments" based on a Query, which has criteria to filter dates and also to filter 0 and 1 of the checkbox ...

The question is:

How do I put in that SubForm one or more Checkbox to "enable" and "disable", only the criteria of such query? So, toggle, for example, those jobs that are not completed (Checkbox of the query=0) and those that do ...

I hope you can help me,
Thank you!
DMX. -
 
You would put the criteria controls on the parent form. I include criteria in the query that references the controls. Then I add a button to the form to "apply" the new criteria which forces the subform to requery.

Select ...
From ...
Where (fld1 = Forms!mainform!fld1 OR Forms!mainform!fld1 Is Null)
AND (fld2 = Forms!mainform!fld2 OR Forms!mainform!fld2 Is Null)
AND ...

To requery the subform from the main form:
Code:
Me.subformcontrolname.Form.Requery
 
Apologies, I'm newbie .. You could say a little more about where to place each thing?
Thank you!!
DMX.-
 

Users who are viewing this thread

Back
Top Bottom