Hi All,
I am using MS Access 2010.
I have created a query as "Policy Info"
Create an unbound form, with controls as
District (combo Box),
Due Date (Combo box),
Cancel Only and its a check box
I have created a subform that contains bound controls from the query "Policy Info"
I want to filter the sub form data according to the unbound controls defined in Main Form. i.e. District, Due Date, Cancel Only.
Also advice how to pass multiple values in query criter for a single field
I have write query in District Row Source as
Purpose, to filter the sub form according to the value of district (if single then sub form will display only select district record) if ALL then all records must be displayed.
All is not working with below criteria, Similary the District values in Policies tables are 2, and 23,
When I select we four rows displays, (result is correct), but when I select 3 (the four rows of 23 display) while there is no rows in policies with district value as 3.
I have define the criteria in Query for District as
Kindly help me to correct the criteria when select a single district then only this district related records should be displayed, and when select ALL then all districts records should be displayed.
Similarly the Cancel only criteria is
where Active is the policies table column,
When check box marked only Active=Yes records should be display other wise all records should be display.
Thanks
I am using MS Access 2010.
I have created a query as "Policy Info"
Create an unbound form, with controls as
District (combo Box),
Due Date (Combo box),
Cancel Only and its a check box
I have created a subform that contains bound controls from the query "Policy Info"
I want to filter the sub form data according to the unbound controls defined in Main Form. i.e. District, Due Date, Cancel Only.
Also advice how to pass multiple values in query criter for a single field
I have write query in District Row Source as
Code:
SELECT DISTRICTS.ID, DISTRICTS.DISTRICT FROM DISTRICTS UNION Select Null as AllChoice , "All" as DISTRICT FROM DISTRICTS
ORDER BY DISTRICTS.ID;
All is not working with below criteria, Similary the District values in Policies tables are 2, and 23,
When I select we four rows displays, (result is correct), but when I select 3 (the four rows of 23 display) while there is no rows in policies with district value as 3.
I have define the criteria in Query for District as
Code:
Like "*" & [Forms]![GEN BILLS LATE NOTES]![ComboDistricts]
Similarly the Cancel only criteria is
Code:
[Forms]![GEN BILLS LATE NOTES]![Active]
When check box marked only Active=Yes records should be display other wise all records should be display.
Thanks