473,224 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

Access: Option group converts to integer

I am using the value of an optiongroup to dosome calculations and
display in a text box. When I use an option value say 3 and multiply
it by 1.5, the result I get is 4 and not 4.5. I know this sounds
trivial but I have spent quite a bit of time on this and just cannot
figure it out. Please help.
Nov 12 '05 #1
4 2523
"Ranga" <ra************@yahoo.com> wrote in message
news:29**************************@posting.google.c om...
I am using the value of an optiongroup to dosome calculations and
display in a text box. When I use an option value say 3 and multiply
it by 1.5, the result I get is 4 and not 4.5. I know this sounds
trivial but I have spent quite a bit of time on this and just cannot
figure it out. Please help.


Sounds like some implicit conversion to Integer or Long is going on. First
verfy whether this is a math/datatype issue or a display issue What value do
you see if you output the result to the debug window? What is the Format
property setting of the text box? Post the code if you need more help.
Nov 12 '05 #2
Yes, most likely an implicit conversion to integer is taking place. This
is a datatype issue. I see the value without the decimal even when i
output the result to a debug window. There is NO format setting for the
text box. The code as such is very simple.

Private Sub Frame453_Click()
walk_100_slow_x.Value = Frame453.Value * 1.5
End Sub


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
"Ranganath Gowda" <ra************@yahoo.com> wrote in message
news:40*********************@news.frii.net...
Yes, most likely an implicit conversion to integer is taking place. This
is a datatype issue. I see the value without the decimal even when i
output the result to a debug window. There is NO format setting for the
text box. The code as such is very simple.

Private Sub Frame453_Click()
walk_100_slow_x.Value = Frame453.Value * 1.5
End Sub


This isn't the bahaviour I get. Is the frame or the text box bound to an
underlying column? Other than that I don't know what the problem could be.
Nov 12 '05 #4
Ranga wrote:
I am using the value of an optiongroup to dosome calculations and
display in a text box. When I use an option value say 3 and multiply
it by 1.5, the result I get is 4 and not 4.5. I know this sounds
trivial but I have spent quite a bit of time on this and just cannot
figure it out. Please help.


Are you talking about display or calculations. If display, change the
format of the field to fixed, decimals 1.

I just created an option group. In the afterupdate event my code is
Private Sub Frame0_Click()
MsgBox Frame0 * 1.5
End Sub
and the message is 1.5, 3, and 4.5 for the numbers 1,2,3.
Nov 12 '05 #5

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

Similar topics

6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.