Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 17th, 2004, 08:33 AM
Randy U Randy U is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 5 Randy U User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy I cant get a form to display decimals

I have a table that I can directly input a value such as 0.997854 but when I create a form the value will only display "0" and thats also what gets populated into the table. The values must be exact down to say 5 places after the decimal. Am I using the wrong data type?
This is the code I am using on the form. Help me with what I am doing wrong:

Private Sub Temperature_LostFocus()
Dim CalculateIt
CalculateIt = Int(1.003353 - (0.00026 * Me!Temperature))
If Me!Temperature = "" Then
Me!Text77 = "0.000001"
Else
Me!Text77 = CalculateIt
End If
End Sub

Reply With Quote
  #2  
Old November 17th, 2004, 09:06 AM
nikkimc nikkimc is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 13 nikkimc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking

If its in your design table set the numeric as decimal in the field size and for decimal places set to as many as you want. On the form go to the properties of the text box and set the decimal places in there also.


Hope this helps
Nikki Mc

Reply With Quote
  #3  
Old November 17th, 2004, 10:26 AM
lwells lwells is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 632 lwells User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 21 h 59 m 38 sec
Reputation Power: 5
Randy,

Set data type to double.

lwells

Reply With Quote
  #4  
Old November 18th, 2004, 08:32 AM
Randy U Randy U is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 5 Randy U User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking

Actually neither of those answers worked. I did find a real solution. I had to drop the "Int" from the code and also drop the quotes from another part. After I did that it all worked well.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > I cant get a form to display decimals


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT