I am using the where condition when opening a report. I am using referring to the control in order to pass the criteria, but get a msg that says incorrect data type. It is a text field with info like this (00166), but it works fine when I hard code it. Example below.
docmd.open report ...