i have a textbox called txtSearch and icon called ClearSearch ,
the visible property of the ClearSearch icon is set to NO, so when the form load, the ClearSearch is not visible,
i added this event to changeEvent of the txtSearch, which make the ClearSearch appears when I put some character in the txtSearch
Code: Select all
Private Sub txtSearch_Change()
DoCmd.SetProperty "iconSearchClear", acPropertyVisible, "1"
End Sub
i tried to use if statement but didn't work for me : if txtSearch = "" then DoCmd.SetProperty "iconSearchClear", acPropertyVisible, "0"
regards