Hello,
I am trying to change a filter for a subform (Default) that has a filter based on a drop down box with a Search button to a filter based on radio buttons.
However, I don't understand the current query enough to begin to change it. Here is the command that opens the query which has a subquery as well.
Here is the part of the query I am having difficulty with:
Here is the subquery:
The combo box is named st and has 4 values: "All";"Pre-Installed";"Q Accounts";"Acti ve Accounts.
Can anyone give me some insight into where/how to change values so that I can change from a combo box to radio buttons? Also, is there any way to simplify this? Thanks!
I am trying to change a filter for a subform (Default) that has a filter based on a drop down box with a Search button to a filter based on radio buttons.
However, I don't understand the current query enough to begin to change it. Here is the command that opens the query which has a subquery as well.
Code:
DoCmd.OpenQuery ("QryAccounts")
Code:
FROM QryAccountsSub LEFT JOIN ActiveUsers ON QryAccountsSub.[Account Number] = ActiveUsers.[Account Number] WHERE (( (QryAccountsSub.[Account Number]) =IIf(IsNull([Forms]![Default]![Account]) ,[QryAccountsSub].[Account Number] ,([Forms]![Default]![Account]))) AND ((QryAccountsSub.QQ) =IIf(IsNull([Forms]![Default]![st]) ,[QQ] ,IIf([Forms]![Default]![st]="All" ,[QQ] ,IIf([Forms]![Default]![st]="Pre-Installed" ,1 ,IIf([Forms]![Default]![st]="Q Accounts" ,0 ,[QQ]))))) AND ((QryAccountsSub.Act) =IIf(IsNull([Forms]![Default]![st]) ,1 ,IIf([Forms]![Default]![st]="All" ,[Act] ,IIf([Forms]![Default]![st]="Active Accounts" ,1 ,[Act])))) AND ((QryAccountsSub.LL) =IIf(IsNull([Forms]![Default]![st]) ,[LL] ,IIf([Forms]![Default]![st]="All" ,[LL] ,IIf([Forms]![Default]![st]="Pre-Installed" ,1 ,[LL])))))
Code:
SELECT Accounts.* , IIf(IsNull([Q Date]) ,1 ,0) AS QQ , IIf(IsNull([Live Date]) ,1 ,0) AS LL , IIf(IsNull([Q Date]) And [Live Date]<Date()+20 ,1 ,0) AS Act FROM Accounts ORDER BY Accounts.[Account Number];
Can anyone give me some insight into where/how to change values so that I can change from a combo box to radio buttons? Also, is there any way to simplify this? Thanks!
Comment