When entering data, the default value won't change.

G

Guest

I have a field in a form entitled interest rate, which is set up to be a long
integer, and a percent. When I enter data in this field the data won't stay
and the number just changes back to 0 as soon as I go to enter data in a
different field. What can I do to fix this? I tried to enter it in the table
and it still doesn't work.
 
D

Douglas J. Steele

Long Integers can only contain Integer values. That means that unless your
interest rate is greater than 100%, it's going to be stored as 0.

Change the Field Size from Long Integer to a data type that can handle
decimal values, such as Single, Double or Decimal.
 
J

John W. Vinson

I have a field in a form entitled interest rate, which is set up to be a long
integer, and a percent. When I enter data in this field the data won't stay
and the number just changes back to 0 as soon as I go to enter data in a
different field. What can I do to fix this? I tried to enter it in the table
and it still doesn't work.

A Long Integer by definition is AN INTEGER - that is, a whole number. 3.5% is
a way of displaying 0.035 - which is not a whole number, and cannot be
represented in a Long Integer field type.

I'd change the datatype of the field from Number to Currency (which will give
you exactly four decimal places, no more and no fewer), or leave it as Number
and (if your version of Access supports it) use a Decimal datatype.

John W. Vinson [MVP]
 

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

Similar Threads


Top