WHERE clause (1 Viewer)

spikepl

Eledittingent Beliped
Local time
Today, 01:35
Joined
Nov 3, 2010
Messages
6,142
@Namliam - your fiddle is not impervious to the db going across borders, so it is not as resilient as Str.
 

namliam

The Mailman - AWF VIP
Local time
Today, 01:35
Joined
Aug 11, 2003
Messages
11,695
my "fiddle" has gone across borders, assuming a 2 decimal amount it will work perfectly every time.

With amounts or floats/decimals you have to be carefull anyways, 4,67 isnt always 4,67 afterall
 

radek225

Registered User.
Local time
Yesterday, 16:35
Joined
Apr 4, 2013
Messages
307
spikel - It's not simple as you think. How I can create query with determined value when in tbl i have "," but in sql should be ".". There are two different things for Ms Access. e.g. 0,3 <> 0.3
namliam - the code will be too complicated.
 

DonkeyKong

Registered User.
Local time
Yesterday, 18:35
Joined
Jan 24, 2013
Messages
61
radek... did you see my post? If you can make it work in the SQL editor then you can make it work in VBA.

Tell us that you made the query work in the editor and we can help you write a simple line of code that will replace the ',' with a '.' .
 

namliam

The Mailman - AWF VIP
Local time
Today, 01:35
Joined
Aug 11, 2003
Messages
11,695
syntax error in query expression (comma)
'[Odpad]=20,833333333333333'.

namliam - maybe, but why? value of "liczbaarkuszy1" is result of count with MS Access
How would a count have such a number? average/sum or whatever else perhaps but count no way!

the comma in your "table" is only a display thingy, much like in a date column you can apply a format that shows "Friday 19 sept 2014 4:00:00 PM"...
The date in the table however ACTUALLY is a number (double even) 41901,6666666667
Or if you want it is actually #9/16/2014 16:00:00#, however neither case it is actually Friday 19 sept 2014 4:00:00 PM

Same goes for the decimal point the comma isnt really "in" the table it is a display thingy to help the user, actually IN the table it is still a dot.

This is (more or less) the same reason why lookups in tables are only major invites to major problems because you display something other than is actually there.... which will cause headaches when you apply filters or use SQL.
 

Users who are viewing this thread

Top Bottom