|
-
Oct 21st, 2000, 06:02 AM
#1
Thread Starter
Addicted Member
Hello!
I have one annoying problem with Format() function.
I retrieve records from DB and if value of field is 0, the Format() function returns me ".00". Here's the code I use:
Code:
Format(!Qty, "##,###.00")
This is annoying, because if I print the value Format() returns, it's printed just ".00".
Any suggestions?
Zvonko Bostjancic
Ilirska Bistrica, Slovenia
[email protected]
Using VS6 Professional with SP3
Programming mostly in VB and I've started to learn VC++ & MFC
-
Oct 21st, 2000, 07:40 AM
#2
_______
What do you want to get"
The format function is giving you what you ask for.
If you want 0 then
dim x
x = Format(!Qty, "##,###.00
if x = ".00" then x = "Whatever"
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Oct 21st, 2000, 08:39 AM
#3
Member
Is this what you want?
Format(!Qty, "##,##0.00")
-
Oct 21st, 2000, 02:33 PM
#4
Thread Starter
Addicted Member
YES! That was what I was looking for.
Thanks!
Zvonko Bostjancic
Ilirska Bistrica, Slovenia
[email protected]
Using VS6 Professional with SP3
Programming mostly in VB and I've started to learn VC++ & MFC
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|