473,508 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Percent Data Entry in Table?

MX1
Hi all,

I've setup a table with one field that will hold percent values. The type
is number and the format is percent on the field. When I do data entry
directly into the field, I have to put in .03 to get 3%. If I just enter 3,
i get 300%. Is there a way to configure the table to let me type in 3 and
have it enter as 3%?

Thanks!
Nov 12 '05 #1
4 22714
The "Format" of the field is just that, formatting.

A value of 3% will be stored as 0.03 (obviously in binary) despite any
formatting used on the field.

Short answer = No

P
"MX1" <mx*@mx1.abc> wrote in message
news:P8zmb.27010$HS4.102088@attbi_s01...
Hi all,

I've setup a table with one field that will hold percent values. The type
is number and the format is percent on the field. When I do data entry
directly into the field, I have to put in .03 to get 3%. If I just enter 3, i get 300%. Is there a way to configure the table to let me type in 3 and
have it enter as 3%?

Thanks!

Nov 12 '05 #2
"MX1" <mx*@mx1.abc> wrote in message
news:P8zmb.27010$HS4.102088@attbi_s01...
Hi all,

I've setup a table with one field that will hold percent values. The type
is number and the format is percent on the field. When I do data entry
directly into the field, I have to put in .03 to get 3%. If I just enter 3, i get 300%. Is there a way to configure the table to let me type in 3 and
have it enter as 3%?

Thanks!

You might find it easier not to use the percent format - just remove it so
you store the numbers in the table 100 times bigger. Eg in this case, the
number would be stored as 3 not 0.03 - just display the percent sign as a
label on a form or report. Just bear this in mind if you perform any
calculations on these numbers.

Fletcher
Nov 12 '05 #3
Try this in the field's On Exit event, just change the txtMyNum field to the
name of your field.

Private Sub txtMynum_Exit(Cancel As Integer)
If Me!txtMynum > 0.99 And Me.Dirty Then
Me!txtMynum = Me!txtMynum / 100
End If
End Sub

You could display a message box asking the user if they want to convert the
number but this would get frustrating for the user.

Stewart
"MX1" <mx*@mx1.abc> wrote in message
news:P8zmb.27010$HS4.102088@attbi_s01...
Hi all,

I've setup a table with one field that will hold percent values. The type
is number and the format is percent on the field. When I do data entry
directly into the field, I have to put in .03 to get 3%. If I just enter 3, i get 300%. Is there a way to configure the table to let me type in 3 and
have it enter as 3%?

Thanks!

Nov 12 '05 #4
"MX1" <mx*@mx1.abc> wrote in message news:<P8zmb.27010$HS4.102088@attbi_s01>...
Hi all,

I've setup a table with one field that will hold percent values. The type
is number and the format is percent on the field. When I do data entry
directly into the field, I have to put in .03 to get 3%. If I just enter 3,
i get 300%. Is there a way to configure the table to let me type in 3 and
have it enter as 3%?

Thanks!


You can enter the percentages as 3%, but you must set the fieldlength
as single or double precision to get a floating point datatype in
stead of a scaled integer or decimal datatype. The notation must be
percentage of course.
the problem is probably that access rescales the entered number-value
after converting it to the target-datatype. Because floating-point
values don't loose their fractional part in this operation 3% will be
stored as 0,03 and not as 0 because of the integer-conversion /
rescaling process.

Marc
Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4125
by: Iain Miller | last post by:
Struggling a bit here & would be grateful for any help. I have a table which has a list of people in it. Each person has a unique ID automatically allocated by Access but also belongs to one of 5...
1
7972
by: Terencetrent | last post by:
I am trying to format a query expression drawn from a dialog box as percent. The original statement to get the value for the query is as follows: New%markup: !! The dialog box looks the...
3
6596
by: Nothing | last post by:
This is going to be a really stupid question, but I am having a problem with the percent format in a control on a form. My end goal is that I want the user to enter 17 and have the control...
2
35861
by: mhodkin | last post by:
I created a query in which I have grouped data by City. I wish to calculate the percent of each value, e.g. City/(Total count of all Cities), in tbe next column of the query. I can't seem to...
7
1644
by: Mike | last post by:
List, I call this a "Parsing Problem", but it could be called formatting or regular expressions as well. I have a set of data that was formerly processed on an OS390 (hence a lot of...
2
5035
by: filbennett | last post by:
Hi Everyone, I'm generally unfamiliar with Access form design, but have programmed Cold Fusion applications for a couple of years. I'd like to build a data entry form in Access that allows the...
1
1933
by: maiami2 | last post by:
Hi Guys, I'm very new to access and I've been trying to get the hang of it over the last few days, but I've become very confused with various aspects of how to code it. Introduction: I am...
0
1022
by: NerdRunner | last post by:
My ASP.NET application contains a form with drop lists for filtering data. The lists are populated from views in SQL Server 2000. One view includes a sort command and selcts the Top 100 Percent...
20
6880
by: hippomedon | last post by:
Hello everyone, I'm looking for some advice on whether I should break the normalization rule. Normally, I would not consider it, but this seems to be a special case. I have created an...
0
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7124
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7385
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3195
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1558
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.