473,395 Members | 1,583 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
Oct 22 '09 #1

✓ answered by ADezii

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

4 5133
NeoPa
32,556 Expert Mod 16PB
What about Hyperlink fields (and the associated controls)?
Oct 23 '09 #2
ADezii
8,834 Expert 8TB
  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)consisting 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.
Oct 23 '09 #3
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.
Nov 12 '09 #4
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?
Nov 12 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Ravi | last post by:
Q1.)In SQL Server 2000, is it always possible to use copies of the data and transaction log files of a database from one server to reattach to a new database on another server, or even to the same...
7
by: Wayne Aprato | last post by:
I have several Access 2003 mde databases. When I try to open them in Access 2002 I get the following error: "The Visual Basic for Applications project in the database is corrupt." ...
4
by: Greg P | last post by:
I know this is a long post, please bear with me. I have been working on this all weekend to no avail although I have done a good amount of research (see most pertinent links that I've looked at...
0
by: wal | last post by:
How does one attach files to emails using libgmail? The following code http://pramode.net/articles/lfy/fuse/4.txt works fine when said files are simple text files, but it failes as soon as the...
4
by: Mark | last post by:
I know that you can format url's withing an Access database but can you physically attach Word, Excel or pdf files within one? I need to attach backup documents into a database I am creating. Any...
5
by: Robert Dufour | last post by:
I am trying to use framework 1.1 - stuck with it. to send emails from a windows form application. The email messages can have attachments, usually two and they can be either text or sounds (wav...
5
by: rogersw8n | last post by:
Some how, some way the account that creates folders under Temporary Internet files has been changed to a domain account for VS 2003 and VS 2005. I recently installed VS 2005. All seemed to be ok...
2
by: ARC | last post by:
(sorry for the re-post, but I thought I would put the winmail.dat where it's visible in the subject...thanks!) Hello all, I have a question that I hope someone can help with. I have an Access...
16
by: Wayne | last post by:
I've read that one method of repairing a misbehaving database is to save all database objects as text and then rebuild them from the text files. I've used the following code posted by Lyle...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.