Query criteria from form incorrect

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have form with an option box (values 1-5) that I want to use in a query.
The value however is captured in the query as Hex 1 (ctrl-A). I appears that
if I use a combo box, text box or any other control with numeric values the
results are the same. If the control is contains alpha the value(s) the query
field is correct.

I've compacted/repaired the DB several time with no change.

Thanks
Jim T.
 
Jim T. said:
I have form with an option box (values 1-5) that I want to use in a query.
The value however is captured in the query as Hex 1 (ctrl-A). I appears that
if I use a combo box, text box or any other control with numeric values the
results are the same. If the control is contains alpha the value(s) the query
field is correct.


The 1 is an integer value, not a character string. Change
the query to so that it converts the option value to a
string (one character) using the CStr function. E.g.

CStr(Forms!theform.theoptiongroup)
 
Back
Top