If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Subform Question #Error
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 |
#2
|
|||
|
|||
Subform Question #Error
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... -- Daryl S "Gary B" wrote: 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 |
Thread Tools | |
Display Modes | |
|
|