I am extremely new to working with Access and am having trouble with writing VBA code that will would do something like this:
Private Sub YesNoShowHide ()
If DateTested_checkbox = 'yes'
Then show 'DateTested' column in 'search query' query
Else DateTested_checkbox = 'no'
Then hide 'DateTested' column in 'search query' query
End Sub
I have a database that has a form that will perform a "custom search" by typing keywords into the text boxes and hitting search it will but the keywords into the query. I have many fields and would like to make a option that would show or hide the columns in the query based off the check boxes in the form.
Any help at all or suggestions would be appreciated
Form and Query Picture: