2+3 = 23 ?

piet123

piet
Local time
Today, 18:53
Joined
May 24, 2004
Messages
66
in the qry design grid i have 2 columns:

totfield1: (Nz([field1],0)) | totfield2: (Nz([field2],0))

then

in a 3rd column i have

grndtot: [totfield1]+[totfield2]

all works okay except:

if field1 value is 2
and
field2 value is 3
i get
grndtot as 23 instead of 5 !

i could do it before but i forgot how.

please help.

thanks
piet.
 
You have field1 & field2 set up as text fields. So the + operator is just gluing two bits of text together.

You need to change your fields to numeric in the table design. Then the calculation will work.

hth
Stopher
 
solved

sorry, my mistake (stupid, stupid stupid mistake) .
it happens sometimes at 2am.

the qry was based upon another qry where i was counting a text field with a 'where' clause. problem is that i also had a 'group by' where i should have had a 'where' in another [date] field.

fixed now.

thanks anyway.
piet.
 

Users who are viewing this thread

Back
Top Bottom