473,387 Members | 1,582 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,387 software developers and data experts.

Processing attachments

102 64KB
Background: Front/Back Ends: MS Access 2010/VBA

I have a field named Attachments in an access table and it has a data type of attachment. I have an unbound
form that reads the table and populates the fields.
Expand|Select|Wrap|Line Numbers
  1. With rs
  2.  
  3.      Me.frmDateTime.Value = .Fields("Datex")
  4.      typex = .Fields("Type")
  5.      Me.frmContact.Value = .Fields("Contact")
  6.      Me.frmFile.Value = .Fields("File")
  7.      Me.frmReference.Value = .Fields("Reference")
  8.      Me.frmSubject.Value = .Fields("Subject")
  9.      Me.frmNote.Value = .Fields("Note")
  10.      Me.frmDateTime2.Value = .Fields("Datex")
  11.      Me.frmAttachments.Value = .Fields("Attachments")
  12.  
  13. End With
The problem is nothing is in the Attachments field. What is wrong?

Thanks.
Mar 13 '15 #1
1 4031
zmbd
5,501 Expert Mod 4TB
It appears that the attachment control on the form that you are attempting to use is not the correct type for the attachment field.

Here's a start from MS: Attach files and graphics to the records in your database Scroll down a ways to the section for forms.

The attachment datatype is actually a special field that creates a hidden table that links the records in the hidden table to the record in the data table. So you basically have to open a recordset on the value of the attachment field to use the information contained therein which is what the attachment control will do behind the scenes.

And the following may also prove helpful:
How to: Work With Attachments In DAO
Look at the code carefully, notice how they open the recordset on the field.

Personally I do not use the attachment field except for very special circumstances as the tend to fill up the available file space quickly and are a bit clunky to use in VBA or even Macro scripting for automation. Instead I tend to store the link to the file in a text field and pull from there when needed.

If you have a more specific question or can provide more detail about what you were expecting to happen and what is actually happening we can be of more help.
Apr 20 '15 #2

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

Similar topics

5
by: PIII450 | last post by:
Hi all, Does anyone know of a class which will read outlook email messages. I need to be able to scan outlook for "non-read" e-mails with a specific subject and then save the attachments and...
3
by: LutherRevisited | last post by:
Is there a way I can put a message together without having to download any attachments there may be at the same time. I'm not having any problems dealing with attachments, but the way I'm doing...
1
by: unemotionalhumanoid | last post by:
I am going to write an application in c# that downloads email from an Exchange server and processes the attachments to the email. What is the best way of downloading the email and getting access to...
2
by: Osiris Sawiris | last post by:
I inherited an Inventory control application that updates the stock from the branches at the end of each day. We receive the stock transactions via e-mail attachments (Excel Sheets). Those...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
6
by: chris_fieldhouse | last post by:
Hi, I have a script for processing emails, The script finds email sent to a particular alias, grabs the body text of the email and stores it into a database. Problem is that certain character...
0
by: =?ISO-8859-15?Q?Bernard_Delm=E9e?= | last post by:
Hello, We have a processing chain automatically handling email attachments in python, which works well. We'd like to add support for encrypted files. We're using python 2.3 on HP-UX. I've...
2
by: Robson Siqueira | last post by:
Folks, I've been experiencing a weird problem. I have a web service which sends an email after its processing. The email always has an PDF attachment on it. The PDF size vary overtime. The...
1
by: WeeWillie | last post by:
Hi all, I'm needing to create a program that monitors an email inbox and process incoming emails that have attachments. What I am wanting it to do is to open the attachment and...
0
by: wilcochris | last post by:
Hi all, Just after some advice really. This is my first time posting on here, so please forgive me if my post isn't up to the required standard. I have a form for emailing someone and it also...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.