hi all i have macro that searches a fields but not tick box fields i would like to show tick fields if yes is enter and if no enter then show not tick fields
thanks for your help in advance here the macro
Code:
Name="Beep"/><Comment>Macro can't be run from the navigation pane.</Comment><Action Name="StopMacro"/></Statements><Sub Name="ApplyFilterFavorite"><Statements><ConditionalBlock><If><Condition>IsNull([Screen].[ActiveControl]) Or [Screen].[ActiveControl]=0</Condition><Statements><Comment>Clear Filters.</Comment><Action Name="RunMacro"><Argument Name="MacroName">Filters.ClearFilter</Argument></Action><Action Name="StopMacro"/></Statements></If></ConditionalBlock><ConditionalBlock><If><Condition>[Screen].[ActiveControl]=-1</Condition><Statements><Comment>Manage Filters.</Comment><Action Name="RunMacro"><Argument Name="MacroName">Filters.Manage</Argument></Action><Action Name="StopMacro"/></Statements></If></ConditionalBlock><Comment>Apply Filters</Comment><Action Name="SetTempVar"><Argument Name="Name">FilterString</Argument><Argument Name="Expression">DLookUp("[Filter String]","Filters","ID = " & [Screen].[ActiveControl])</Argument></Action><Action Name="SetTempVar"><Argument Name="Name">SortString</Argument><Argument Name="Expression">DLookUp("[Sort String]","Filters","ID = " & [Screen].[ActiveControl])</Argument></Action><ConditionalBlock><If><Condition>Not IsNull([TempVars]![FilterString])</Condition><Statements><Action Name="ApplyFilter"><Argument Name="WhereCondition">=[TempVars]![FilterString] & IIf(Not [Form]![chkShowRetired],"and ([Retired Date ] is null or [Retired Date ] > date())","")</Argument></Action></Statements></If></ConditionalBlock><ConditionalBlock><If><Condition>Not IsNull([TempVars]![FilterString])</Condition><Statements><Action Name="SetValue"><Argument Name="Item">[txtSearchBox]</Argument><Argument Name="Expression">""</Argument></Action></Statements></If></ConditionalBlock><ConditionalBlock><If><Condition>[CurrentProject].[IsTrusted] And Not IsNull([TempVars]![SortString])</Condition><Statements><Action Name="SetValue"><Argument Name="Item">[OrderBy]</Argument><Argument Name="Expression">Nz([TempVars]![SortString])</Argument></Action></Statements></If></ConditionalBlock><ConditionalBlock><If><Condition>[CurrentProject].[IsTrusted]</Condition><Statements><Action Name="SetValue"><Argument Name="Item">[OrderByOn]</Argument><Argument Name="Expression">Not IsNull([TempVars]![SortString])</Argument></Action></Statements></If></ConditionalBlock><Action Name="RemoveTempVar"><Argument Name="Name">FilterString</Argument></Action><Action Name="RemoveTempVar"><Argument Name="Name">SortString</Argument></Action></Statements></Sub><Sub Name="New"><Statements><Action Name="RunMacro"><Argument Name="MacroName">Filters.CheckFilter</Argument></Action><Action Name="RunMacro"><Argument Name="MacroName">Filters.SetupTempVars</Argument></Action><Action Name="OpenForm"><Argument Name="FormName">Filter Details</Argument><Argument Name="DataMode">Add</Argument><Argument Name="WindowMode">Dialog</Argument></Action><Action Name="Requery"><Argument Name="ControlName">cboFilterFavorites</Argument></Action><ConditionalBlock><If><Condition>[CurrentProject].[IsTrusted]</Condition><Statements><Action Name="SetValue"><Argument Name="Item">[Form]![cboFilterFavorites]</Argument><Argument Name="Expression">[TempVars]![LastFilterCreated]</Argument></Action></Statements></If></ConditionalBlock><Action Name="RunMacro"><Argument Name="MacroName">Filters.RemoveTempVars</Argument></Action></Statements></Sub><Sub Name="SetLastFilterID"><Statements><Comment>Used in conjunction with NEW to set the value of the combo box when trusted.</Comment><Action Name="SetTempVar"><Argument Name="Name">LastFilterCreated</Argument><Argument Name="Expression">[ID]</Argument></Action></Statements></Sub><Sub Name="Manage"><Statements><Action Name="SetTempVar"><Argument Name="Name">ObjectType</Argument><Argument Name="Expression">[Application].[CurrentObjectType]</Argument></Action><Action Name="SetTempVar"><Argument Name="Name">ObjectName</Argument><Argument Name="Expression">[Application].[CurrentObjectName]</Argument></Action><Action Name="OpenForm"><Argument Name="FormName">Filter Details</Argument><Argument Name="WhereCondition">[Object Name]=[Application].[CurrentObjectName]</Argument><Argument Name="WindowMode">Dialog</Argument></Action><Action Name="RunMenuCommand"><Argument Name="Command">Refresh</Argument></Action><Action Name="RemoveTempVar"><Argument Name="Name">ObjectType</Argument></Action><Action Name="RemoveTempVar"><Argument Name="Name">ObjectName</Argument></Action></Statements></Sub><Sub Name="SetupTempVars"><Statements><Action Name="SetTempVar"><Argument Name="Name">ObjectType</Argument><Argument Name="Expression">[Application].[CurrentObjectType]</Argument></Action><Action Name="SetTempVar"><Argument Name="Name">ObjectName</Argument><Argument Name="Expression">[Application].[CurrentObjectName]</Argument></Action><Action Name="SetTempVar"><Argument Name="Name">FilterString</Argument><Argument Name="Expression">[Filter]</Argument></Action><Action Name="SetTempVar"><Argument Name="Name">SortString</Argument><Argument Name="Expression">[OrderBy]</Argument></Action></Statements></Sub><Sub Name="RemoveTempVars"><Statements><Action Name="RemoveTempVar"><Argument Name="Name">ObjectType</Argument></Action><Action Name="RemoveTempVar"><Argument Name="Name">ObjectName</Argument></Action><Action Name="RemoveTempVar"><Argument Name="Name">FilterString</Argument></Action><Action Name="RemoveTempVar"><Argument Name="Name">SortString</Argument></Action><Action Name="RemoveTempVar"><Argument Name="Name">Order</Argument></Action><Action Name="RemoveTempVar"><Argument Name="Name">LastFilterCreated</Argument></Action></Statements></Sub><Sub Name="ClearFilter"><Statements><ConditionalBlock><If><Condition>[CurrentProject].[IsTrusted] And [Form].[Name]="Franklyn Shaw Jobs"</Condition><Statements><Action Name="SetValue"><Argument Name="Item">[Form]![cboFilterFavorites]</Argument><Argument Name="Expression">""</Argument></Action></Statements></If></ConditionalBlock><Comment>Clear Filter</Comment><Action Name="ApplyFilter"><Argument Name="WhereCondition">""</Argument></Action><ConditionalBlock><If><Condition>[Form].[Name]="Franklyn Shaw Jobs" And Not ([Form]![chkShowRetired])</Condition><Statements><Comment>Filter out Retired assets if checkbox is cleared</Comment><Action Name="ApplyFilter"><Argument Name="WhereCondition">="[Retired Date ] is null or [Retired Date ] > date()"</Argument></Action></Statements></If></ConditionalBlock><Action Name="GoToControl"><Argument Name="ControlName">txtSearchBox</Argument></Action><Action Name="SetProperty"><Argument Name="ControlName">SearchClear</Argument><Argument Name="Property">Visible</Argument><Argument Name="Value">False</Argument></Action><Action Name="SetProperty"><Argument Name="ControlName">SearchGo</Argument><Argument Name="Property">Visible</Argument><Argument Name="Value">True</Argument></Action><ConditionalBlock><If><Condition>[CurrentProject].[IsTrusted]</Condition><Statements><Action Name="SetValue"><Argument Name="Item">[txtSearchBox]</Argument><Argument Name="Expression">""</Argument></Action></Statements></If></ConditionalBlock><Action Name="StopMacro"/></Statements></Sub><Sub Name="CheckFilter"><Statements><ConditionalBlock><If><Condition>Not ([Form].[FilterOn] Or [Form].[OrderByOn])</Condition><Statements><Action Name="MessageBox"><Argument Name="Message">You don't have a filter or sort to save.</Argument><Argument Name="Title">Save Filter</Argument></Action><Action Name="StopAllMacros"/></Statements></If></ConditionalBlock></Statements></Sub><Sub Name="QuickSearch"><Statements><ConditionalBlock><If><Condition>[txtSearchBox]=""</Condition><Statements><Comment>Clear Filter when search box empty</Comment><Action Name="RunMacro"><Argument Name="MacroName">Filters.ClearFilter</Argument></Action><Action Name="StopAllMacros"/></Statements></If></ConditionalBlock><ConditionalBlock><If><Condition>VarType([txtSearchBox])<>8</Condition><Statements><Action Name="StopAllMacros"/></Statements></If></ConditionalBlock><Action Name="SetProperty"><Argument Name="ControlName">SearchGo</Argument><Argument Name="Property">Visible</Argument><Argument Name="Value">True</Argument></Action><ConditionalBlock><If><Condition>[txtSearchBox]="" And [SearchClear].[Visible]<>0</Condition><Statements><Action Name="SetProperty"><Argument Name="ControlName">SearchClear</Argument><Argument Name="Property">Visible</Argument><Argument Name="Value">False</Argument></Action><Action Name="StopAllMacros"/></Statements></If></ConditionalBlock><Comment>Handle "'s in search</Comment><Action Name="SetTempVar"><Argument Name="Name">strSearch</Argument><Argument Name="Expression">Replace([txtSearchBox],"""","""""")</Argument></Action><Comment>Build the Filter for the Asset list</Comment><ConditionalBlock><If><Condition>[Form].[Name]="Franklyn Shaw Jobs"</Condition><Statements><Action Name="SetTempVar"><Argument Name="Name">strFilter</Argument><Argument Name="Expression">"([Item] Like ""*" & [TempVars]![strSearch] & "*"")"</Argument></Action></Statements></If></ConditionalBlock><ConditionalBlock><If><Condition>[Form].[Name]="Franklyn Shaw Jobs"</Condition><Statements><Action Name="SetTempVar"><Argument Name="Name">strFilter</Argument><Argument Name="Expression">[TempVars]![strFilter] & " OR ([Description] Like ""*" & [TempVars]![strSearch] & "*"")"</Argument></Action></Statements></If></ConditionalBlock><ConditionalBlock><If><Condition>[Form].[Name]="Franklyn Shaw Jobs"</Condition><Statements><Action Name="SetTempVar"><Argument Name="Name">strFilter</Argument><Argument Name="Expression">[TempVars]![strFilter] & " OR ([test] Like ""*" & [TempVars]![strSearch] & "*"")"</Argument></Action></Statements></If></ConditionalBlock><ConditionalBlock><If><Condition>[Form].[Name]="Franklyn Shaw Jobs"</Condition><Statements><Action Name="SetTempVar"><Argument Name="Name">strFilter</Argument><Argument Name="Expression">[TempVars]![strFilter] & " OR ([Comments] Like ""*" & [TempVars]![strSearch] & "*"")"</Argument></Action></Statements></If></ConditionalBlock><ConditionalBlock><If><Condition>[Form].[Name]="Franklyn Shaw Jobs"</Condition><Statements><Action Name="SetTempVar"><Argument Name="Name">strFilter</Argument><Argument Name="Expression">[TempVars]![strFilter] & " OR ([Category] Like ""*" & [TempVars]![strSearch] & "*"")"</Argument></Action></Statements></If></ConditionalBlock><ConditionalBlock><If><Condition>[Form].[Name]="Franklyn Shaw Jobs"</Condition><Statements><Action Name="SetTempVar"><Argument Name="Name">strFilter</Argument><Argument Name="Expression">[TempVars]![strFilter] & " OR ([Model] Like ""*" & [TempVars]![strSearch] & "*"")"</Argument></Action></Statements></If></ConditionalBlock><ConditionalBlock><If><Condition>[Form].[Name]="Franklyn Shaw Jobs"</Condition><Statements><Action Name="SetTempVar"><Argument Name="Name">strFilter</Argument><Argument Name="Expression">IIf(Not [Form]![chkShowRetired],"([Retired Date ] is null or [Retired Date ] > date()) AND (" & [TempVars]![strFilter] & ")",[TempVars]![strFilter])</Argument></Action></Statements></If></ConditionalBlock><Comment