Click to See Complete Forum and Search --> : inserting percentage field in access db


janice
12-10-2004, 12:39 PM
I know this is asp forum but does anyone know what datatype field called fldPercent would be?

We added a field called fldPercent into our access database so that whenever a product needs to be discounted, the percentage discount for that product would be recorded under the fldPercentage fieldname.

So far, I am not sure if the value should, say 10% or .10 and what the datatype will be so that when we perform the following calculation:

select cprice-cprice*fldPercent from table, we would determine the percent discount.

Thanks in advance

russell
12-10-2004, 01:09 PM
make a copy of the mdb and look at the table (in the copy) in design view to see what the data type is.
if you can't access the mdb then, i'd take a guess that its data type double. could also be single, or decimal.

use .10 not 10%

janice
12-10-2004, 03:42 PM
I can access the mdb.

That is not what I said, I hope not.

I said that I needed to know what the datatype of a fieldname that is used for storing percentages.

Sorry if I am not clear and thanks for your help.

russell
12-10-2004, 03:45 PM
as i said, open the table in design view to see what the data type is.

perhaps i'm not understanding the question?

buntine
12-10-2004, 08:14 PM
Set the datatype as number and then use the format option (in the column details pane below) to set the format to 'precent'.

^ Thats what would be done to store a number as a percentage.

Im also a little confused, though. Why not just open the table and take a look in design view?

Regards.

janice
12-10-2004, 08:50 PM
I think I misunderstood Russel,
my apology.

If I had understood his response, I would have said that I went to design view, didn't see a floating point number like double.

The closest things I saw were number and currency but I know those wouldn't work but thanks to Buntine, I got it now.

Thanks all.