defining decimal places in a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello---I am having trouble with defining decimal places in a form. I have set
Properties box/format/decimalplaces to 2 and defined the format as general
number--but my form still converts each 3.5 to 4 (etc) I have gotten Access
to accept my 3.5 IF I define the format as text, but then I can't query my
data as numbers.

Thanks
french fry
 
The format only determines how the data is displayed and has nothing to do
with how it is actually stored.
If you want to be able to use decimals then the field in the underlying
table should be defined as currency, number/single or number/double. Which
you use depends on the range of numbers and amount of decimals you need for
your data.

For more info look up datatype and fieldsize in help.
 
Hello---I am having trouble with defining decimal places in a form. I have set
Properties box/format/decimalplaces to 2 and defined the format as general
number--but my form still converts each 3.5 to 4 (etc) I have gotten Access
to accept my 3.5 IF I define the format as text, but then I can't query my
data as numbers.

Thanks
french fry

It appears you have set the Field Datatype to Number, but the Field
Size to either Long integer or Integer.
By definition, an Integer is a whole number and cannot have a decimal
value.

Delete the the Form control.
Open the Table that the control was bound to in Design View.
In the TABLE, change the DataType back to Number.
Set the Field Size to either Single or Double.
Set the Format to Standard or Fixed
Set Decimal Places to 2.

Open the Form in Design View.
Add the field to the Form from the Field List.
The form control will accept the table properties as default.
 
Back
Top