Percent Format 10% shows 1000%

G

geeves1293

Hi all,

I've got a field as number - percent - 0 decimal - double.

When I enter 10 and tab on it changes to 1000% not the expected 10%.

Anybody know why this is?

Thanks

Geeves1293
 
J

John Spencer

Simple
.10 is 10 percent
10 is 10 * 100 percent or 1000 percent

Percent format just show the number as percentage points.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
G

geeves1293

Simple yes, but a bit annoying when having to put .1 instead of 10 to get
what i want.
I'm going to have to put a comment on field for other users on how to put
10% in field.

Thanks

geeves1293
 
D

Duane Hookom

You could add some code to the After Update event of the text box like:

If Me.txtYourTBoxName > 1 Then
Me.txtYourTBoxName = Me.txtYourTBoxName /100
End If
 
G

geeves1293

Thanks for help

Im putting =[fldDISCOUNT] / 100 in the after update text box for this field
on the form.

I couldn't get anything to change. I tried your Iif function and got the
same result.

The structure is quite simple.
unit price - discount * qty on a subform datasheet view.

Is there something i'm missing somewhere?

Thanks again

geeves1293
 
D

Duane Hookom

I'm not sure where you entered the code I suggested. It should be in the code
window, not the property. Also, my code used "If" not "IIf"
--
Duane Hookom
Microsoft Access MVP


geeves1293 said:
Thanks for help

Im putting =[fldDISCOUNT] / 100 in the after update text box for this field
on the form.

I couldn't get anything to change. I tried your Iif function and got the
same result.

The structure is quite simple.
unit price - discount * qty on a subform datasheet view.

Is there something i'm missing somewhere?

Thanks again

geeves1293

Duane Hookom said:
You could add some code to the After Update event of the text box like:

If Me.txtYourTBoxName > 1 Then
Me.txtYourTBoxName = Me.txtYourTBoxName /100
End If
 
G

geeves1293

Oh, I put it into the property window in form design view.

Code? Is that a new module (at the bottom of database window)?

Your following code includes Me.txtYourTBoxName. Do I replace all of that
with my fldDISCOUNT.

Thanks

Graham

Duane Hookom said:
I'm not sure where you entered the code I suggested. It should be in the code
window, not the property. Also, my code used "If" not "IIf"
--
Duane Hookom
Microsoft Access MVP


geeves1293 said:
Thanks for help

Im putting =[fldDISCOUNT] / 100 in the after update text box for this field
on the form.

I couldn't get anything to change. I tried your Iif function and got the
same result.

The structure is quite simple.
unit price - discount * qty on a subform datasheet view.

Is there something i'm missing somewhere?

Thanks again

geeves1293

Duane Hookom said:
You could add some code to the After Update event of the text box like:

If Me.txtYourTBoxName > 1 Then
Me.txtYourTBoxName = Me.txtYourTBoxName /100
End If


--
Duane Hookom
Microsoft Access MVP


:

Simple yes, but a bit annoying when having to put .1 instead of 10 to get
what i want.
I'm going to have to put a comment on field for other users on how to put
10% in field.

Thanks

geeves1293





:

Simple
.10 is 10 percent
10 is 10 * 100 percent or 1000 percent

Percent format just show the number as percentage points.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

geeves1293 wrote:
Hi all,

I've got a field as number - percent - 0 decimal - double.

When I enter 10 and tab on it changes to 1000% not the expected 10%.

Anybody know why this is?

Thanks

Geeves1293
 
D

Duane Hookom

My suggestion used the code/vba/module window. You would replace
"txtYourTBoxName" with your actual text box name.
--
Duane Hookom
Microsoft Access MVP


geeves1293 said:
Oh, I put it into the property window in form design view.

Code? Is that a new module (at the bottom of database window)?

Your following code includes Me.txtYourTBoxName. Do I replace all of that
with my fldDISCOUNT.

Thanks

Graham

Duane Hookom said:
I'm not sure where you entered the code I suggested. It should be in the code
window, not the property. Also, my code used "If" not "IIf"
--
Duane Hookom
Microsoft Access MVP


geeves1293 said:
Thanks for help

Im putting =[fldDISCOUNT] / 100 in the after update text box for this field
on the form.

I couldn't get anything to change. I tried your Iif function and got the
same result.

The structure is quite simple.
unit price - discount * qty on a subform datasheet view.

Is there something i'm missing somewhere?

Thanks again

geeves1293

:

You could add some code to the After Update event of the text box like:

If Me.txtYourTBoxName > 1 Then
Me.txtYourTBoxName = Me.txtYourTBoxName /100
End If


--
Duane Hookom
Microsoft Access MVP


:

Simple yes, but a bit annoying when having to put .1 instead of 10 to get
what i want.
I'm going to have to put a comment on field for other users on how to put
10% in field.

Thanks

geeves1293





:

Simple
.10 is 10 percent
10 is 10 * 100 percent or 1000 percent

Percent format just show the number as percentage points.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

geeves1293 wrote:
Hi all,

I've got a field as number - percent - 0 decimal - double.

When I enter 10 and tab on it changes to 1000% not the expected 10%.

Anybody know why this is?

Thanks

Geeves1293
 
F

Fred

IMHO yo are going through a lot of work to make two wrongs = a right.

If I understand your requirement properly, just make your PercentDiscout
field a simple numeric field (not %) and have the user enter the percent.
Just have the displays of that field add a % sign after it (e.g. using format
function)

And have your discount equations do the math appropriately. For example
(unitPrice * (1-PerCentDiscount/100))*quantity = total sell price
 
G

geeves1293

In the table the field name "fldDISCOUNT" has a number datatype and is
formatted with percentage and size set to single.

I think that is what you have stated to do, but still no luck.

Graham
 
G

geeves1293

I cannot seem to get this to work.

I opened a new module and pasted (with the field name change) your code into
it.

How does access know when I use that field to use the code.

Thanks again
Graham

Duane Hookom said:
My suggestion used the code/vba/module window. You would replace
"txtYourTBoxName" with your actual text box name.
--
Duane Hookom
Microsoft Access MVP


geeves1293 said:
Oh, I put it into the property window in form design view.

Code? Is that a new module (at the bottom of database window)?

Your following code includes Me.txtYourTBoxName. Do I replace all of that
with my fldDISCOUNT.

Thanks

Graham

Duane Hookom said:
I'm not sure where you entered the code I suggested. It should be in the code
window, not the property. Also, my code used "If" not "IIf"
--
Duane Hookom
Microsoft Access MVP


:

Thanks for help

Im putting =[fldDISCOUNT] / 100 in the after update text box for this field
on the form.

I couldn't get anything to change. I tried your Iif function and got the
same result.

The structure is quite simple.
unit price - discount * qty on a subform datasheet view.

Is there something i'm missing somewhere?

Thanks again

geeves1293

:

You could add some code to the After Update event of the text box like:

If Me.txtYourTBoxName > 1 Then
Me.txtYourTBoxName = Me.txtYourTBoxName /100
End If


--
Duane Hookom
Microsoft Access MVP


:

Simple yes, but a bit annoying when having to put .1 instead of 10 to get
what i want.
I'm going to have to put a comment on field for other users on how to put
10% in field.

Thanks

geeves1293





:

Simple
.10 is 10 percent
10 is 10 * 100 percent or 1000 percent

Percent format just show the number as percentage points.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

geeves1293 wrote:
Hi all,

I've got a field as number - percent - 0 decimal - double.

When I enter 10 and tab on it changes to 1000% not the expected 10%.

Anybody know why this is?

Thanks

Geeves1293
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top