I have column table which has values 1 and 2.
What should i code in CRITERIA of query builder so that when checkbox is ticked in form all records in the table with column value 1 appear and records with value 2 appeas if unchecked.


path for check box:
[Forms]![frm_Main]![opt_prr]

You need to create a field in the query along the lines of this:

IIF([Forms]![frm_Main]![opt_prr],1,2)

This will result in all the records showing a 1 if the box is checked and a 2 if the box is unchecked. You then need to add the fieldname of the field that is either the 1 or 2 from the table as the criteria of the field mentioned above.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.