Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

inserting value as percentage

Status
Not open for further replies.

loveday

Programmer
Sep 19, 2004
106
US
I have a field name called fldPercent.

This field name is created so we can insert a discount percentage for a given product.

This way, we can query the db to obtain the percentage for a product like thus:

select cprice-cprice*fldPercent from table

but I need to know the right datatype for a percentage field name.

Also the value for percentage be entered as say 10% or .10?

Thanks in advance
 
In an Access mdb use a floating point number such as a double. Enter as .10
 
Access database doesn't have a double datatype
 
Access database doesn't have a double datatype
Really ?
In table design view create a numeric field and then choose a field size in the combo ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
You can also use Decimal

Make sure you set your decimal places correct in the format -- otherwise, you may get some interesting numbers.

An example, in the table design view is...
Data Type - Number
Field Size - Decimal (at the bottom section under field properties)
Format - Percent
Percision - 6
Scale - 4
Decimal Places - 4

Review MS Access help on Decimal format. Play with the settings to make sure you set the values correctly. A lot easier doing this part right the first time rather than correcting data later.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top