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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top