this is driving me crazy. i need to use a form control as a criteria
in a select query, and the control's value is set depending upon what
a user selects in an option group on the form. the query results
should return information on either a single employee or all
employees.
the problem that i have is that if i type in "*" (but without quotes)
in the QBE criteria, it works fine. however, if i use Iif() to
determine whether or not there is a value in the control and then use
* if there is not, i get a "data type mismatch" error. the empID field
is a numeric field.....so, that makes sense, but i don't understand
why * works if typed in, but not if you use a function or a form
control. i suspect it's because of a string / numeric data type
difference.
the question boils down to how do i use "*" or "like *", by using Iif
or a function (i've also created a function that returns * and that
doesn't work either) without explicitly typing it in?
thanks for any help you can offer.