473,395 Members | 1,484 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,395 software developers and data experts.

Need Help !!!

I have developed a system using VB but I am facing some problem in displaying my results. The results of calculations performed are being displayed in scientific format inspite of my changing the format of text boxes. For example .09725 is being displayed as 9.725 E-2. I have kept the Max Length to be 100.

Can someone please help.

Regards
Raj
Jan 18 '07 #1
6 919
iburyak
1,017 Expert 512MB
Try to display cstr(.09725 ).

Not sure why you get it this way. I couldn't replicate this at all.
Jan 18 '07 #2
Killer42
8,435 Expert 8TB
Try to display cstr(.09725 ).

Not sure why you get it this way. I couldn't replicate this at all.
It could be related to data type. And the VB version.

I think I overcame this at one point by using Format(variable,"Fixed").
Jan 19 '07 #3
Try to display cstr(.09725 ).

Not sure why you get it this way. I couldn't replicate this at all.
Thanks for replying. I tried as an example cstr(Text 21/ Text 141), but it didnt make any difference. Can u think of something else?

Regards
Raj
Jan 19 '07 #4
It could be related to data type. And the VB version.

I think I overcame this at one point by using Format(variable,"Fixed").
I am sorry for asking this but I am confused. For example Shall I write this as Format(Text 15/ Text 141, "Fixed")

Sorry for inconvinience but I have just started learning VB.

Regards
Raj
Jan 19 '07 #5
Killer42
8,435 Expert 8TB
I am sorry for asking this but I am confused. For example Shall I write this as Format(Text 15/ Text 141, "Fixed")
Sorry for inconvinience but I have just started learning VB.
You could certainly try it that way, and see what happens.

Where I included "variable", this could be any expression which evaluates to a number. If you use Text15 / Text141 (I'll assume these are two textbox controls) then VB would use the default property of these controls. In the case of the textbox, the default property is .Text, which is a string. In such a case, I personally would use the Val( ) function to convert each of them to numeric format, but in fact VB is quite forgiving in this area and will probably do that conversion for you.

I believe that trial and error is a very important part of learning programming. Try everything you can think of. If it doesn't work, at least you know for next time. And once you understand why it didn't work, you'll know something knew. :)
Jan 19 '07 #6
iburyak
1,017 Expert 512MB
I don't think it has anything to do with a text box itself.
Show me the code on how you do calculations and display result in a textbox, please.
Jan 19 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Sofia | last post by:
My name is Sofia and I have for many years been running a personals site, together with my partner, on a non-profit basis. The site is currently not running due to us emigrating, but during its...
6
by: Robert Maas, see http://tinyurl.com/uh3t | last post by:
System login message says PHP is available, so I tried this: http://www.rawbw.com/~rem/HelloPlus/h.php It doesn't work at all. Browser just shows the source. What am I doing wrong?
0
by: Gregory Nans | last post by:
hello, i need some help to 'tree-ify' a string... for example i have strings such as : s = """A(here 's , B(A ) silly test) C(to show D(what kind) of stuff i need))""" and i need to...
7
by: Mike Kamermans | last post by:
I hope someone can help me, because what I'm going through at the moment trying to edit XML documents is enough to make me want to never edit XML again. I'm looking for an XML editor that has a...
8
by: JustSomeGuy | last post by:
I need to write an new class derived from the list class. This class stores data in the list to the disk if an object that is added to the list is over 1K in size. What methods of the std stl...
3
by: Bob.Henkel | last post by:
I write this to tell you why we won't use postgresql even though we wish we could at a large company. Don't get me wrong I love postgresql in many ways and for many reasons , but fact is fact. If...
2
by: Michael R. Pierotti | last post by:
Dim reg As New Regex("^\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}$") Dim m As Match = reg.Match(txtIPAddress.Text) If m.Success Then 'No need to do anything here Else MessageBox.Show("You need to enter a...
8
by: skumar434 | last post by:
i need to store the data from a data base in to structure .............the problem is like this ....suppose there is a data base which stores the sequence no and item type etc ...but i need only...
11
by: Alan Mailer | last post by:
A project I'm working on is going to use VB6 as a front end. The back end is going to be pre-existing MS Access 2002 database tables which already have records in them *but do not have any...
0
by: U S Contractors Offering Service A Non-profit | last post by:
Brilliant technology helping those most in need Inbox Reply U S Contractors Offering Service A Non-profit show details 10:37 pm (1 hour ago) Brilliant technology helping those most in need ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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...

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.