Hello, Can anyone help with this at all...
I have a Form (FActions) that shows a record from a table (TActions).
The form also shows a subform (TLinks_subform) that relates to a "linked files" table (TLinks).
The User can associate reports (TReport) with the Action record (one to many) by adding Report references to the Linked files table. This table simply holds associations between the TActions and TReports records. The Linked Table field that brings the two together is [ARef] or Action Reference number.
The report table lists the reports but these also physically exist as files in a directory e.g. R0001.pdf, R0002.pdf etc.
TLinks looks like this...
ID ARef Link
1 A0001 R0004
2 A0001 R0017
3 A0005 R0023
I have a routine that opens an new email and fills out To, From and Body text with appropriate data contained in the Action Form / record.
What I need is some sort of VB loop that examines the linked files table for all associated records and then checks a directory for the presence of the physical files and (if found) attaches each one in turn to the newly created email. In the example above, an email for Action A0001 would open and attach two files (R0004.pdf and R0017.pdf).
There are a number of posts found around email and attachments but nothing I can find that covers this specific requirement.
All help would be appreciated.
Thanks
Flint2048
I have a Form (FActions) that shows a record from a table (TActions).
The form also shows a subform (TLinks_subform) that relates to a "linked files" table (TLinks).
The User can associate reports (TReport) with the Action record (one to many) by adding Report references to the Linked files table. This table simply holds associations between the TActions and TReports records. The Linked Table field that brings the two together is [ARef] or Action Reference number.
The report table lists the reports but these also physically exist as files in a directory e.g. R0001.pdf, R0002.pdf etc.
TLinks looks like this...
ID ARef Link
1 A0001 R0004
2 A0001 R0017
3 A0005 R0023
I have a routine that opens an new email and fills out To, From and Body text with appropriate data contained in the Action Form / record.
What I need is some sort of VB loop that examines the linked files table for all associated records and then checks a directory for the presence of the physical files and (if found) attaches each one in turn to the newly created email. In the example above, an email for Action A0001 would open and attach two files (R0004.pdf and R0017.pdf).
There are a number of posts found around email and attachments but nothing I can find that covers this specific requirement.
All help would be appreciated.
Thanks
Flint2048