Percent Format Madness

D

DS

I have an unbound textbox called "TxtDisplay".
I'm using Command buttons with the code
Command1
Me.TxtDisplay = Me.TxtDisplay & 1

Command2
Me.TxtDisplay = Me.TxtDisplay & 2

Etc....

I need the TxtDisplay to show this format....
1%
20%
15%
I'll be using the actual number entered to figure out a percent on a
different field. So if I enter lets say 5 it should display as 5% and
Calculate the answer as such. The other field is a currency field, So if
that field is $20.00 then I would need to end up with an answer of $1.00

Any help is greatly appreciated.
Thanks
DS
 
D

DS

DS said:
I have an unbound textbox called "TxtDisplay".
I'm using Command buttons with the code
Command1
Me.TxtDisplay = Me.TxtDisplay & 1

Command2
Me.TxtDisplay = Me.TxtDisplay & 2

Etc....

I need the TxtDisplay to show this format....
1%
20%
15%
I'll be using the actual number entered to figure out a percent on a
different field. So if I enter lets say 5 it should display as 5% and
Calculate the answer as such. The other field is a currency field, So if
that field is $20.00 then I would need to end up with an answer of $1.00

Any help is greatly appreciated.
Thanks
DS
I have this going on so far,
'1 Button
Private Sub Image1_Click()
If Me.TxtPatDisplay = "Gratuity" Then
Me.TxtPatDisplay = Null
Me.TxtPatDisplay = (Me.TxtPatDisplay & 1) & "%"
Else:
Me.TxtPatDisplay = (Me.TxtPatDisplay & 1) & "%"
End If
End Sub

but it displays this..
1%1%1%
As I enter 1
It should be this...
111111%
Getting closer, I guess.
DS
 
S

Steve Schapel

DS,

It is not clear to me yet what you are trying to do here. Do you have a
textbox that can show the word "Gratuity"? And then you have an Image
control, and if you click the image, you want the textbox to show 1% ?
And then if you click the image again, you want it to show 11% ?
 
D

DS

Steve said:
DS,

It is not clear to me yet what you are trying to do here. Do you have a
textbox that can show the word "Gratuity"? And then you have an Image
control, and if you click the image, you want the textbox to show 1% ?
And then if you click the image again, you want it to show 11% ?
Kinda, Steve. I just figured it out. I ended up using 2 textboxes, one
to hold the number and then one to display the number, then I added a
label on top of the display textbox. So if the number textbox = 0 then
the label shows up if its greater than 0 then the number shows up as
such 5% or whatever number it is with the %. this works great. Thanks
for your intrest.
DS
 

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

troubles with number field with percent format! 1
Format a Percent 4
Format a percent 7
Checking Field Length 6
Currency Format 5
Format a percent field 1
Whats the Differnce 14
Calculating fields on a Form 2

Top