Thanks,
My other question is how can I have a field to show me the exact number.
What I meant is, I am trying to divide 400 / 104 and the field is giving me
4.00 as an answer but I want it to show me 3.85
Thanks
> Two ways:
>
[quoted text clipped - 11 lines]
>
> > How can I have a Command Button to execute all the code I wrote in a form?
Ken Sheridan - 12 May 2008 18:16 GMT
If the result is shown in an unbound control on then you need to set the
Format property of the control to show however many decimal places you want
to show. The following would format the control to show two decimal places
and to use a comma as the separator for values of one thousand or more:
#,##0.00
If the control is bound to a field in the underlying table then the field
should be defined in the table design as a single or double precision
floating point number data type, not an integer (by default number fields are
long integers). However, if the calculated value can always be derived from
other fields in the table then it should not be stored in a field at all.
That constitutes redundancy and leaves the table open to the risk of
inconsistent data being entered. The value can always be obtained by means
of a computed unbound control in a form or report, or by a computed column in
a query.
Ken Sheridan
Stafford, England
> Thanks,
>
[quoted text clipped - 19 lines]
> >
> > > How can I have a Command Button to execute all the code I wrote in a form?