Pesky Sum Text Problem - I Have Searched The Forum

John Jnr

Registered User.
Local time
Today, 11:59
Joined
May 2, 2002
Messages
36
I have a report generated from a form.

In the report I have grouped Expense Type generating a Expense Type Header.
I put this calculated field in the header:
=Sum([ExpenseYear])
And everything works perfectly.
However . . . . . If I put this in:

=Sum("[" & [Forms]![Form6]![Combo0] & "]")

I get that pesky #error

Is it my syntax?

Help much apppreciated.

Cheers

J
:rolleyes:
 
I am not 100% sure why you are doing this but . .

Check the bound column of your combo box. The value of the bound column is what will be returned by your forms!form6.combo0 argument.

Eg: If you have the ID column bound (eg: id = 6) it will result in sum([6])

You may need to specify the column that you wish to obtain the info from.

HTH

Brad.
 
Cracked It!

Brad,
As ever I played and played then finally cracked it:
I wrote the control source into VBA as:
Text79.ControlSource = "=Sum(" & "[" & [Forms]![Form6]![Combo0] & "]" & ")"

Works fine.

Thanks

J:)
 

Users who are viewing this thread

Back
Top Bottom