Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VB5 - Decimal places are missing
#1
A VB5 program, almost like QBasic. - The decimal places are not calculated, but why not? I just can't find the error. Everything is the same as the 2nd screenshot, everything is correct there.

Does anyone know where the error is? Thanks.

[Image: Angebot-VB5-Nachkomma-Fehlt.jpg]
Reply
#2
[Image: KW-PS-Nachkomma-korrekt.jpg]
Reply
#3
Are you using a numerical text box with decimal set in properties?

Probably not because I see Print Using and template...

I am assuming there are Numerical Text Boxes because Fellippe has them in InForm. It's too long since I worked with VB for Dos to remember anything about Numerical text boxes for older version than VB5 but seems to me a likely control to have in VB early on.
b = b + ...
Reply
#4
(06-29-2022, 05:29 PM)bplus Wrote: Are you using a numerical text box with decimal set in properties?

Probably not because I see Print Using and template...

I am assuming there are Numerical Text Boxes because Fellippe has them in InForm. It's too long since I worked with VB for Dos to remember anything about Numerical text boxes for older version than VB5 but seems to me a likely control to have in VB early on.

Yes, it are text fields.
There's something wrong with it, or it's jinxed.  Dodgy

The small sample program "Mehrwertsteuer" works again, the results are absolutely correct.

PS: This is an English version of VB5. Entries have to be with a dot "."
I need something to relax now:    Miss Monique   Big Grin

[Image: Mehrwertsteuer-Korrekt.jpg]
Reply
#5
Now I found the mistake.

Gemeinkosten = Val (Fertigungskosten * 8) / 100

Correct is: Gemeinkosten = (Fertigungskosten * 8) / 100
Reply
#6
Aha! and Miss Monique link pretty nice too. Smile
b = b + ...
Reply




Users browsing this thread: 1 Guest(s)