Subform Question #Error

  • Thread starter Thread starter Gary B
  • Start date Start date
G

Gary B

Hi there,

I am using MS Access 2007 and using the new "attachment" field type.

I have a subform named "frmComplaintsHistory" that contains a control named
"Attachments" (the same name as the field in the table).

On the main form I have a textbox with the formula
"=Sum(NZ([frmComplaintsHistory]![Attachments].[attachmentcount],0))" as I
wish to see how many attachments exist for that record on the main form.

This formula is producing a "#Error" result.

I also have a textbox on the subform named "intAttachCount" with the formula
"=[Attachments].[attachmentcount]" and this is producing a correct result.

Q1. Any suggestions as to how to fix the #Error message.
Q2. I would also like to extract the name(s) of the attachments and attach
them to an email, if an attachment exists. (I am using teh Outlook Object).

Regards
 
Gary -

The =Sum() will only work in the header/footer of the form (in this case
subform) you are summing records for. Look at the DCOUNT function to use on
the main form.

Maybe someone else can help with the attachment question...
 
Back
Top