Convert Single to Percent

  • Thread starter Thread starter cp2599
  • Start date Start date
C

cp2599

This is probably an easy one ... The value keeps getting rounded up.

dim sngPercent as Single
Me.Percent is defined as Percent with 2 decimals on the form

In the immediate window sngPercent = .56134553
But when I try to put it into the form field
Me.Percent = sngPercent
The result is 100%
 
This is probably an easy one ... The value keeps getting rounded up.

dim sngPercent as Single
Me.Percent is defined as Percent with 2 decimals on the form

In the immediate window sngPercent = .56134553
But when I try to put it into the form field
Me.Percent = sngPercent
The result is 100%

Percent is just a format, a display tool.

I suspect the the *TABLE* field to which this form control is bound is the
default Number datatype, Long Integer. An integer is by definition a whole
number.

Change the datatype of the table field to Single.

If that's not it, post back with some more details.
 
Percent is just a format, a display tool.

I suspect the the *TABLE* field to which this form control is bound is the
default Number datatype, Long Integer. An integer is by definition a whole
number.

Change the datatype of the table field to Single.

If that's not it, post back with some more details.

Thank You John! Your solution resolved my problem.
 
Back
Top