Number formats

  • Thread starter Thread starter Andrea
  • Start date Start date
A

Andrea

I am building a database that has a contracts table, which
contains various information about our different
contracts. I have pay methods fields and description
fields, ex. paymethod1, description1, paymethod2,
description2. I need the paymethod fields to be formatted
in such a way that I can enter numbers such as 1500.00
or .12, because the pay method can be different for each
contract some are a percent of something and some are flat
fees. I have been trying different number formats and
custom number formats, but every time I enter a number
beginning with a decimal point and tab to the next field
it changes the value to zero. Any tips on how to solve
this problem?
 
I have pay methods fields and description
fields, ex. paymethod1, description1, paymethod2,
description2.

First mistake: these fields should really be moved out into their own table
like:-

Payments(*MemberID, *PayDate, Method, Description, Amount)
I need the paymethod fields to be formatted
in such a way that I can enter numbers such as 1500.00
or .12, because the pay method can be different for each
contract some are a percent of something and some are flat
fees.

If the different payments are really different entities, then it's possible
(or probable) that they need different tables each. How are you going to
add a dollar amount to a percentage?
I have been trying different number formats and
custom number formats, but every time I enter a number
beginning with a decimal point and tab to the next field
it changes the value to zero.

It is probably possible to do some fancy footwork in the AfterUpdate event
of the Payment.Method textbox in order to change the Payment.Amount.Format
property. On the other hand, I would reccommend just getting the db design
right.

Hope that helps


Tim F
 
Andrea,
In addition to what Tim said about normalizing your data, you should check
the Field Length of the number fields. If they are set to Long Integer, then
you should change them to Double.
 
I am not sure if this makes any difference but the numbers
in the paymethod feilds will be strictly for informational
purposes no calculations will be done with them. All I
need is for the numbers to show.
 
No, that won't make a difference. If the number fields are INTEGER, then
they cannot have decimals.
 
Back
Top