Attaching files in access 2003

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jay123987
    New Member
    • Oct 2009
    • 6

    Attaching files in access 2003

    Morning / Afternoon / Goodday All,
    I was hoping someone can help me in understanding the best way to attach files to a access 2003 form.
    I have a database which is used to log phone calls and emails frm customers.
    When a customer emails and we make a record of this in the database using a form,we then need to attach the email to the record created in the database.
    I have been searching the net and found many methods but none of them are working (OLEDrag n Drop event, MS Listview, BLOB etc)
    I know some dont work on access 2003 but there is no definitive list of these.
    All i requiore is a method of attaching emails (1 or more) to a form in a access database against a record so when a employee calls up the record id on the form they can see all the emails associated with the record raised.
    Ideally a drag and drop would be perfect but then again i cant have everything i want :)
    Please note files can be any format not just email i.e xls, doc. pdf etc
    Any thoughts?
    any help is greatfully welcomed.
    Jay
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32633

    #2
    What about Hyperlink fields (and the associated controls)?

    Comment

    • ADezii
      Recognized Expert Expert
      • Apr 2006
      • 8834

      #3
      1. Create a Table, let's call it tblEMails.
      2. tblEMails will consist of only 2 Fields, a Foreign Key Field that will be Linked to the Primary Key Field in the Parent Table via a MANY ==> 1 Relationship on [RecordID], and another Field of OLE Object Type.
      3. Create a Form (Sub-Form) based on tblEMails, then Drag-N-Drop it on your Parent/Primary Form. If you correctly established the Relationship, the Child and Master Link Fields will automatically be displayed.
      4. Save your E-Mails as .HTML, then Drag-N-Drop them into the OLE Object Field of your Sub-Form for the corresponding Parent Record.
      5. Each Parent Record can now have Multiple Child Records (Embedded)consi sting of E-Mails.
      6. Double-Clicking on a specific E-Mail in the Sub-Form will now Open up that E-Mail in your Default E-Mail Client as an .HTML Document.
      7. I seriously had doubts about my far-fetched idea, but I ran it through the mill, and it actually works quite well.
      8. The beauty of this is that this same process can be applied to any File Types, namely Drag-N-Dropping the File into the Bound OLE Object Field of the Sub-Form.
      Last edited by NeoPa; Nov 12 '09, 07:25 PM. Reason: Removed Quote for Best Answer.

      Comment

      • jay123987
        New Member
        • Oct 2009
        • 6

        #4
        ADezii,

        As always yoru a genius!

        I have got it working so when i drag a file it attachs to sub form however when i click submit on main form the main form data is saved to table A however table B which is where i would like subform data to be save i.e tblEMails saves but does not reset teh control to blank like the main form does, i have tried doing a set control to default but its not working.

        Basically when i click the submit button on main form i want all data to transfer to their respective tables (tblIssueLog & tblEMails) and all controls to clear to default value.

        It works for the main form (issuelog) however the controls in subform (frm_Email) does not clear, however if i close the form down and look at table it has saved.

        how can ensure data is transferred from sub form to tblEMails and reset sub form controls on click of submit button on main form?

        an associated problem is i want the reference number in the sub form to be same reference number in teh main form reference control field and i want this number to be transferred to tblEMails when i click submit button on main form.

        Sorry to though this on you - just been searching web for help and nothings helping.

        Comment

        • jay123987
          New Member
          • Oct 2009
          • 6

          #5
          ADezii,

          I have figured it out,

          I have used a OLE bound object on my form and linked that to a OLE defined field in the table!

          This allows me to drag and drop into table instead of using a sub form!

          i have then used 'me.controlname = nothing' in the onclick of the submit button which resets the control.

          this seems to work however your the expect - any thoughts or downsides to doing it this way?

          Comment

          Working...