Hold Numner in access

  • Thread starter Thread starter Joe Mills
  • Start date Start date
J

Joe Mills

Hi all

I am having a problem with numbers in access
Examble

Dim s As inteerget
s = "1.5"
I get s =2 in debug mode how can i get it to say 1.5 and net 2?

Kenneth
(e-mail address removed)
 
An integer is a whole number. You are assiging a decimal to it.

Look at decimal / single / double
 
Hi all

I am having a problem with numbers in access
Examble

Dim s As inteerget
s = "1.5"
I get s =2 in debug mode how can i get it to say 1.5 and net 2?

An Inteerget (English Integer) is, by definition, a whole number. 1
and 2 are integers; 1.5 is NOT an integer.

Use Dim s As Float <or whatever the Dutch word is, sorry I don't know>
s = 1.5

You also do not need the quotemarks - they tell Access that you are
defining a String constant; you don't want a string, you want a
number. Access will translate the string to number when you assign it
to a variable but it's an unnecessary extra step.
 
Back
Top