Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Rechnen mit Double Werten

Posted on 2000-02-17
5
Medium Priority
?
214 Views
Last Modified: 2013-12-26
Hi Experts,

Warum werden in diesem Fall
meine Nachkommastellen einfach nicht
berücksichtigt. Weder bei der Berechnung noch bei der Ausgabe.

grid.Text =
Format(dSummPorto + dSummBearb, "##,##0.00 DM")

dSummPorto = 44,80
sSummBearb = 48,00
Ausgabe =    92,00 statt 92,80
 
Beide Variablen sind als Double deklariert.

MFG
Jörg

0
Comment
Question by:blackjack020900
  • 3
  • 2
5 Comments
 
LVL 2

Expert Comment

by:p_biggelaar
ID: 2531505
Hallo,

Ich bin nicht sicher aber Ich denke das grid (von grid.text) ein DataGrid ist.

In diesen Fall sollte man bei Properties -> tab Format eine Custom Format wahlen (deine Format string). Möchtest du ein Format in Code haben, dann must du das machen mit:

DataGrid1.Columns(index).NumberFormat = "##,##0.00 DM"

Entsculdige fur mein slechtes Deutsch.

Now in English, because I think most Experts do know English and only few of them know German:

When you try to format a value and assign it to a cell in a grid, it won't come through. You'll have to use code like this:

DataGrid1.Columns(index).NumberFormat = "##,##0.00 DM"

or set the format property for the approriate column to the correct value, using the property page
0
 

Author Comment

by:blackjack020900
ID: 2531583
Leider ist es ein MSFlexGrid.

Um den Text einer Zelle zu Bearbeiten,
konvertiere mit der Val-Funktion, was
nicht funktionieren kann, da die Daten in der Datenbank mit einem Komma als Trennzeichen gespeichert sind.

Die CDbl-Funktion nimmt er mir gar nicht an.

Ich bin etwas ratlos!

MFG
Jörg
0
 
LVL 2

Expert Comment

by:p_biggelaar
ID: 2532047
In dieser Fall must du sorgen das die komma ein punkt wird.

Ich hoffe du kannst mir verzeihen, aber Ich mus jetzt gehen...

Bis spater
0
 
LVL 2

Accepted Solution

by:
p_biggelaar earned 150 total points
ID: 2532049
p_biggelaar changed the proposed answer to a comment
0
 

Author Comment

by:blackjack020900
ID: 2558180
Danke.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question