Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / November 2005

Tip: Looking for answers? Try searching our database.

Percent Format Madness

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DS - 19 Nov 2005 13:46 GMT
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
DS - 19 Nov 2005 14:32 GMT
> I have an unbound textbox called "TxtDisplay".
> I'm using Command buttons with the code
[quoted text clipped - 18 lines]
> 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
Steve Schapel - 19 Nov 2005 18:20 GMT
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% ?

Signature

Steve Schapel, Microsoft Access MVP

>> I have an unbound textbox called "TxtDisplay".
>> I'm using Command buttons with the code
[quoted text clipped - 38 lines]
> Getting closer, I guess.
> DS
DS - 20 Nov 2005 09:52 GMT
> 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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.