Decimal value in SQL statemen gives error when Regional settings are set to Dutch

  • Thread starter Thread starter Luc Gillemot
  • Start date Start date
L

Luc Gillemot

A form with a textbox where the user can type a decimal value like 0,005
I want to use this value in an select statement

"SELECT * from MyTable Where MyValue=" & forms!Myform!Value

i want to use this selection for de rowsource of a combobox

the result is Select * from MyTable where myvalue=0,005 which gives an
error.
The comma is not correct, it should be 0.005

This is probably a bug but i did not find a workaround

Has anyone a solution or workaround for this problem

Thanks
 
I don't have any experience with the Dutch Regional Setting but try:

"SELECT * from MyTable Where MyValue= Eval(forms!Myform!Value)"

(also try CDbl() instead of Eval())
 
Hi Luc

Like Van, I don't have any experience with the Dutch version either. But if
Value is an unbound text box (nothing in its Control Source), Access may
treat the entry as text rather than number. To tell it the entry is a
number, set the Format property of the text box to General Number.

When you build the SQL string, see if BuildCriteria() yields the results you
need. Can't promise, but it's supposed to sort out this kind of thing.

michka has written some good stuff on internationalization in vb. Starting
place:
www.triteminal.com
 
Back
Top