Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Reports

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 08-31-2009, 07:45 AM
jdrubins jdrubins is offline Windows XP Access 2003 (version 11.0)
Novice
 
Join Date: Aug 2009
Posts: 3
jdrubins is on a distinguished road
Smile Sum values in concatenated fields

I could use a little help...

I am building a report for an event planning database. I'm trying to put together a simple report that in the detail section will display the names of guests and the count of those attending. That part is simple and is working (e.g., each line says "Doe, Jane - 2 guests". Where I am having difficulty is in the page header of the report, I'd like to put a text box that shows "Total Guest Count - 34", where the 34 is a sum of the [number_attending] value from the detail records.

I've tried writing a concatenated string in the page header as follows...

="Total Guest Count - " & Sum(nz([number_attending]))

but this only returns an #error note in the report preview. The [number_attending] is a number value and is pulling from a query that the report is based on. Can anyone help in how to use a sum function in a concatenated field?
Reply With Quote
  #2  
Old 08-31-2009, 08:33 AM
lloyddobler lloyddobler is offline Windows XP Access 2003 (version 11.0)
Novice
 
Join Date: Aug 2009
Posts: 19
lloyddobler is on a distinguished road
Default

what happens if you remove the nz function?
Reply With Quote
  #3  
Old 08-31-2009, 03:13 PM
jdrubins jdrubins is offline Windows XP Access 2003 (version 11.0)
Novice
 
Join Date: Aug 2009
Posts: 3
jdrubins is on a distinguished road
Default

If I remove the nz function, I still get the error message. The statement as it is written works in the report header... but not in the page header. Trying to get it there so it shows on each page.
Reply With Quote
  #4  
Old 09-01-2009, 04:10 AM
lloyddobler lloyddobler is offline Windows XP Access 2003 (version 11.0)
Novice
 
Join Date: Aug 2009
Posts: 19
lloyddobler is on a distinguished road
Default

I've had that happen for no reason too. I usually copy/paste from another section or another report where it's doing similar and that has worked. Have you tried copying from the report header?
Reply With Quote
  #5  
Old 09-01-2009, 05:20 AM
jdrubins jdrubins is offline Windows XP Access 2003 (version 11.0)
Novice
 
Join Date: Aug 2009
Posts: 3
jdrubins is on a distinguished road
Default

Tried pasting back from the report header into the page header... but no luck. Still getting the error message.
Reply With Quote
Reply

Bookmarks

Tags
concatenate, report, sum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Table fields which depend on other fields Ben Access 3 08-10-2009 06:33 AM
Prevent Duplicate Values on Combination of Two Fields LornaM Database Design 8 05-05-2009 09:16 PM


All times are GMT -8. The time now is 01:39 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.