A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Usinga a Percentage field in a Combo Box (can't get rid of *.00%)?



 
 
Thread Tools Display Modes
  #1  
Old June 7th, 2004, 02:11 AM
Rod
external usenet poster
 
Posts: n/a
Default Usinga a Percentage field in a Combo Box (can't get rid of *.00%)?

I have a Combo Box based on a look up table for a percentage field. The percentage field has been set up as follows:

Field Name: Percent
Data Type: Number
Field Size: Single
Format: Percent
Decimal Places: 0

The values entered into the table are as follows:

5%
10%
20%
....
99%
100%

Everything here works fine. What I am having difficulty with is that when the drop down list appears, the percentage values display as:

5.00%
10.00%
20.00%
....
99.00%
100.00%

This may seem trivial, but is there a way to have the combo box just display the percentage values without the two decimal place? They don't appear in the field after being selected.

Any suggestions??
Rod

  #2  
Old June 7th, 2004, 02:50 AM
Ken Snell
external usenet poster
 
Posts: n/a
Default Usinga a Percentage field in a Combo Box (can't get rid of *.00%)?

Post the Row Source that you're using for the combo box.

--

Ken Snell
MS ACCESS MVP

"Rod" wrote in message
...
I have a Combo Box based on a look up table for a percentage field. The

percentage field has been set up as follows:

Field Name: Percent
Data Type: Number
Field Size: Single
Format: Percent
Decimal Places: 0

The values entered into the table are as follows:

5%
10%
20%
...
99%
100%

Everything here works fine. What I am having difficulty with is that when

the drop down list appears, the percentage values display as:

5.00%
10.00%
20.00%
...
99.00%
100.00%

This may seem trivial, but is there a way to have the combo box just

display the percentage values without the two decimal place? They don't
appear in the field after being selected.

Any suggestions??
Rod



  #3  
Old June 7th, 2004, 12:14 PM
Van T. Dinh
external usenet poster
 
Posts: n/a
Default Usinga a Percentage field in a Combo Box (can't get rid of *.00%)?

Use Format() function in the Calculated Field

Format([YourPercentField], "0%")

and use the above in the RowSource rather than your Field.

--
HTH
Van T. Dinh
MVP (Access)




"Rod" wrote in message
...
I have a Combo Box based on a look up table for a percentage field. The

percentage field has been set up as follows:

Field Name: Percent
Data Type: Number
Field Size: Single
Format: Percent
Decimal Places: 0

The values entered into the table are as follows:

5%
10%
20%
...
99%
100%

Everything here works fine. What I am having difficulty with is that when

the drop down list appears, the percentage values display as:

5.00%
10.00%
20.00%
...
99.00%
100.00%

This may seem trivial, but is there a way to have the combo box just

display the percentage values without the two decimal place? They don't
appear in the field after being selected.

Any suggestions??
Rod



  #4  
Old June 8th, 2004, 01:56 AM
Rod
external usenet poster
 
Posts: n/a
Default Usinga a Percentage field in a Combo Box (can't get rid of *.00%)?

Thanks for your replies.

To Ken Snell:

The row source for the combo box was:
SELECT [Completion Percentage].[Percentage] FROM [Completion Percentage] ORDER BY [Completion Percentage].[Percentage];

Using Van T. Dinh reply, I changed the row source to:
SELECT format([Completion Percentage].[Percentage], "0%") FROM [Completion Percentage] ORDER BY [Completion Percentage].[Percentage];

and it worked perfectly. Now the drop down lists displays the percentages as:

5%
10%
20%
....
99%
100%

I know this sems trivial, but I really appreciate the response.

Go Flames Go!!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:05 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.