Subform Question #Error

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
 
D

Daryl S

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top