Percent

Susan Allen Wyoming

Registered User.
Local time
Today, 22:24
Joined
Feb 15, 2001
Messages
22
First of all, I would like to say thank you to everybody who helps out with this. I have spent endless hours, banging my head against the wall and talking to MSAccess support engineers for a umhum..."nominal fee." This is the first website that actually makes sense, Thank you, thank you, thank you!!!

Ok, now for my problem.....

I would like to be able to enter "10" into my
Discount field and have it display as 10%. Instead I have to enter .10 or 10%.

Also, Is there a way that I can have a control group that I can select either % or $ and have my data display either way.

Any insight, would be much appreciated.
 
Rich - -

Was the article supposed to be a hyperlink? If so, I didn't get it. Can I view it by going to the "all knowing" Microsoft Web Site?

Susan
 
If your percent field is just for 'looks' and you do not use this number in calculations then this is in the After Update event of a Text box will do the trick.

Me![FieldName] = Me![FieldName} & "%"

If you are using the number in calculations then you will have to leave it as a Number field and just put a Percent sign as a label just to the right of your field so that you know that the number is a percent.

I am not sure why you would want to change currency fields to percent fields and then back again but a Command button with code like this will do it:

Me![FieldName].Format = "Percent"
Me![FieldName] = Me![FieldName]/100

This will change $200.00 into 200.00%

PS. Rich's Article number is incorrect. There is no such Article.

[This message has been edited by Jack Cowley (edited 02-21-2001).]
 
The reason why I wanted to change the calculation from $ to % is because some of my suppliers charge freight based on a dollar amount and some based on a percentage. I think I've given up on that part, I can just use a calculator, but.....

I'm still not clear on the first part. Right now my properties in the table are set to:
Field Size: Single
Format: Percent
Decimal Places: 0

I would like to be able to enter a "10" and have the % sign hanging out to the right as a label like you said. But, how does that work when trying to perform calculations?
 
OK. I understand about changing $ to %. I think that you want to find a percentage of the dollar amount. If you can do it with your calculator you can do it with Access. You may have to add a couple of unbound fields to your form and do your calculations and display the answer in those fields.

I would remove the Percent format from the field that will contain your "percent" then I would do my calculations like this:

Me![Answer] = (Me![Cost] * Me![Percent))*.01

Where Answer is an unbound field on your form. Obviously you can do much more complex calculations, but I'll leave those 'til later.

If you are not clear or still have questions you can contact me directly by email.

[This message has been edited by Jack Cowley (edited 02-21-2001).]
 
If I understand you correctly, you have the possibility two types of charging? (by percentage of invoice value or something, or a flat rate?)

If this is the case, then you really need two separate fields to put the two different types into (you can always leave a zero in whichever field you don't use).

That way your application doesn't need to interpret what the value in the fields means, only perform a calculation on it, so you have (flat rate plus zero% of invoice) or (zero flat rate plus 10% of invoice). You could have a yes/no field in your Hauliers(or whatever you call it) table that will control which of the two fields will be enabled or visible on your form.

Mike

[This message has been edited by Mike Gurman (edited 02-22-2001).]
 

Users who are viewing this thread

Back
Top Bottom