Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,569 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,918 people online right now. Registration is fast and FREE... Join Now!




acsess vb corcework problem

 
Reply to this topicStart new topic

acsess vb corcework problem

flosy
12 Apr, 2008 - 12:45 PM
Post #1

New D.I.C Head
*

Joined: 15 Jul, 2007
Posts: 15


My Contributions
Hi im using acess vb to make a simulation. A program is ran when a button is presed, it adds 0.1 to the total and the display is updated based upon this figure.

dim example as single

privatesub examplesub

example = example + 0.1

msgbox example

end sub

However when I run this it and it works fine (mostly) however every howevermany times and then it displays e.g. 26.1666666666666. as an example. Can anyone shed some light upon why this is hapening?
User is offlineProfile CardPM
+Quote Post

flosy
RE: Acsess Vb Corcework Problem
12 Apr, 2008 - 02:51 PM
Post #2

New D.I.C Head
*

Joined: 15 Jul, 2007
Posts: 15


My Contributions
np sorted it I just used full digits and then converted them to decimals when I outputed them.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 11:56PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month