Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Add a numeric value in the parentdocument, problem with decimal value

0 views
Skip to first unread message

Okko Hamminga

unread,
Apr 19, 2000, 3:00:00 AM4/19/00
to
Here is a part of the code I use in the queryclose event of the form. I want
to add the value from "uren" to "INT_uren" in the parentdocument. This works
correctly as long as I don't use decimals. When the inputvalue looks like
this "2,5" , the result of val("2,5") = 2. If my inputvalue would be "2.5"
then it's no problem, but I can't ask users to change de decimalvalue to "."
when they want use this application. I also tried Cdbl(uren). Maybe there is
a better way to get the value from "uren" instead of uidoc.fieldgettext.
What would be the best way to solve this.

Set parentdoc = db.GetDocumentByUNID(response.ParentDocumentUNID )
uren=uidoc.fieldgettext("Ureninvoer_aantaluur")
totaaluren = parentdoc.INT_Uren(0) + Val(uren)
Call parentDoc.replaceitemvalue("INT_Uren",totaaluren)

Michael Fariborz

unread,
Apr 20, 2000, 3:00:00 AM4/20/00
to
Could you do an Instr looking for the "," and replace it with a ".". Then you
wouldn't have to ask the user to make any changes to the way they imput data and
you could still get the correct value.

Deb

unread,
Apr 20, 2000, 3:00:00 AM4/20/00
to
Hi, have you tried changing the decimal symbol on the Control tab in
the properties box for the field? It's worth a try.

Deb

In article <IOoL4.74120$5r.9...@nlnews00.chello.com>,


"Okko Hamminga" <ok...@hamminga.com> wrote:
> Here is a part of the code I use in the queryclose event of the form.
I want
> to add the value from "uren" to "INT_uren" in the parentdocument.
This works
> correctly as long as I don't use decimals. When the inputvalue looks
like
> this "2,5" , the result of val("2,5") = 2. If my inputvalue would
be "2.5"
> then it's no problem, but I can't ask users to change de decimalvalue
to "."
> when they want use this application. I also tried Cdbl(uren). Maybe
there is
> a better way to get the value from "uren" instead of
uidoc.fieldgettext.
> What would be the best way to solve this.
>
> Set parentdoc = db.GetDocumentByUNID(response.ParentDocumentUNID )
> uren=uidoc.fieldgettext("Ureninvoer_aantaluur")
> totaaluren = parentdoc.INT_Uren(0) + Val(uren)
> Call parentDoc.replaceitemvalue("INT_Uren",totaaluren)
>
>


Sent via Deja.com http://www.deja.com/
Before you buy.

0 new messages