Hello, I have a form based on a query of a table that contains a date field. the query has calculated fields based on the datefield [EventDate] one that just shows the year "yyyy" and onthe that just shows the month "mmmm"
I have 2 unbound combo boxes in the header I would like to use to filter the form.
The the row source for each combo box is a Select statement that show the distinct Years and Months respectively using Format(EventDate,"yyyy") and Format(EventDate,"mmmm")
The result I am looking for is if both combo boxes are blank then there is no filter applied, if there is a year selected the show all dates from that year, if there year and month seleced show dates from the year and month, if only a month is selected then show dates from any year in that month.
Ive tried to use as the criteria:
IIf(IsNull([Forms]![frmEventDateList]![cmbMonth]),"LIKE ""*""",[Forms]![frmEventDateList]![cmbMonth])
IIf(IsNull([Forms]![frmEventDateList]![cmbYear]),"LIKE ""*""",[Forms]![frmEventDateList]![cmbYear])
thinking that if the cobo box was blank it would plug LIKE "*" but that doesn't work.