Concatenating instead of adding???

AccessDeano

Trying not to be a newbie
Local time
Today, 14:50
Joined
Aug 29, 2003
Messages
30
I have a report generated from a crosstab query.

The crosstab has 4 fields I need to add together.

In my form box I have used:

=[1] + [2] + [3] + [4]

as my column names are 1,2,3 and 4.

However this returns a concatenated string rather than a numerical total. If I take away the [] I get "10" ie. 1+2+3+4.

I can not seem to work out where I have gone wrong.

I have tried to change the column headings it my query as I thought access could be confused as my headings were numerical, but the query will no longer run when I cahnge them.

Can any one put me out of my misery?

My query, if this helps is below:

TRANSFORM nz(Count([Response]),0) AS Expr1
SELECT UsedResponses.QuestionID, UsedResponses.SortData
FROM UsedResponses
WHERE (((UsedResponses.Date) Between [Forms]![datetestused]![StartDate] And [Forms]![datetestused]![EndDate]))
GROUP BY UsedResponses.QuestionID, UsedResponses.SortData
ORDER BY UsedResponses.SortData
PIVOT UsedResponses.Response In (1,2,3,4);

Thanks
 
Last edited:
However this returns a concatenated string rather than a numerical total.
This implies that your fields are text fields try doing

cdbl([1])+cdbl[2])....

Regards
 
Or use the Val() function.
 
Thank you both very much. I am really grateful.

Problem solved.
 

Users who are viewing this thread

Back
Top Bottom