trying to do a comparison on numeric fields

M

Monika Schwartz

Hello all,

I'm trying to do an if..then...else comparison where my
condition is one field being greater than or equal to
another field. Both of the fields are numbers. What's
happening is that it seems to be doing a string comparison
of them. If one number is 200 and the other is 1000, it
thinks the 200 is greater. I could understand if my
datasource were a text file, but it's a query out of
Access and these are numeric fields.

I would really appreciate any assistance you can provide.
Thanks!!

Monika
 
C

Cindy Meister -WordMVP-

Hi Monika,

See my responses to Jonathan Crow on the use of quotes when
comparing string vs. numerical data. Basically: don't use
quotes when you want to force a numerical comparison; use
quotes when you do.
I'm trying to do an if..then...else comparison where my
condition is one field being greater than or equal to
another field. Both of the fields are numbers. What's
happening is that it seems to be doing a string comparison
of them. If one number is 200 and the other is 1000, it
thinks the 200 is greater. I could understand if my
datasource were a text file, but it's a query out of
Access and these are numeric fields.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan
24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

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

Top