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

strange effect on certain textbox's

16 views
Skip to first unread message

bipin

unread,
Nov 25, 2009, 5:00:06 PM11/25/09
to
Hi,

When i add values on a for i have been using
the following syntax:
= Me("txtbox-6-1") + Me("txtbox-19-1")
the result is inconsistant. for example:
if Me("txtbox-6-1") = 1000
and
Me("txtbox-19-1") = 100
the value should be 1100
but in some fields i am getting 1000100
as if i were asking for:
= Me("txtbox-6-1") & Me("txtbox-19-1")
very confusing.

Thanks,
Bipin

hbinc

unread,
Nov 25, 2009, 5:28:39 PM11/25/09
to

Hi Bipin,

The + operator kan give some unpredicted results in terms of addition
or concatenation.
So for concatenation use &, and for addition make sure your fields
contain numerals.

HBInc.

Salad

unread,
Nov 25, 2009, 5:29:04 PM11/25/09
to
bipin wrote:

What happens if you Cint() or Clng() it?
= Clng(Me("txtbox-6-1")) + Clng(Me("txtbox-19-1"))

bipin

unread,
Nov 25, 2009, 5:40:35 PM11/25/09
to

> What happens if you Cint() or Clng() it?
>         = Clng(Me("txtbox-6-1")) + Clng(Me("txtbox-19-1"))

Clng seems to do the trick.

thanks a million.
bipin

0 new messages