How do you set a fields value to default to a negative number in a table.

Signature
Joe Cilinceon
Rick B - 02 Nov 2005 18:56 GMT
You don't. You want someone to type "1" but store -1? Why?
Just adjust your calculations to always subtract.
If I indicate that I sold 1 widget, I would reduce my onhand inventory by
one. I would not, however, store "-1" in my order details table.
If you do insist on doing this, I'd think you would do it using code in your
form. Before updating the record just multiply by -1.

Signature
Rick B
> How do you set a fields value to default to a negative number in a table.
KARL DEWEY - 02 Nov 2005 18:59 GMT
First the data type must be either single or double. Open the table in
design view and click on the menu VIEW - Properties.
In the Default enter your negative value - -1 or -125
> How do you set a fields value to default to a negative number in a table.
Joe Cilinceon - 02 Nov 2005 19:09 GMT
Thanks again guys but as soon as I sent this, it dawned on me to just fix
the data before updateing the table if they forget to enter the number as a
negitive. DUH.

Signature
Joe Cilinceon
John Vinson - 02 Nov 2005 19:51 GMT
>How do you set a fields value to default to a negative number in a table.
With an Update query, updating [fieldname] to
- [fieldname]
John W. Vinson[MVP]