I need to count records in a table for a report, with criteria based on a value in a Combo Box. I created a query in Design View, with 4 columns, each for the same combo box, to query on 4 different criteria.
I first tried = "Board Meeting", in the Criteria row. But Access reports a data type mismatch.
Researching, I found MS suggests using the DLookup() function to work on a Combo Box. To work this out, I turned off the remaining 3 columns and concentrated on just column 1.
The Combo Box is named [Event Type]. The Table is [Events]. The criteria is "Board Meeting". The Combo Box Consists of two columns: ID in Column 0 and the text value to query on, in Column 1.
I created the DLookUp expression as follows:
=DLookUp("[Event Type]","Events","[Event Type].Column(1) = Board Meeting")
Using this expression, Access reports, missing operator in the criteria expression, followed by another message "Unknown". I can't figure out what operator Access thinks it needs. What is wrong with this criteria expression? See image of the query design view.