473,324 Members | 2,239 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,324 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 2530
"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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.