Problem with display of the filename of Attachment Data Type

  • Thread starter Thread starter No display of attachment.FileName
  • Start date Start date
N

No display of attachment.FileName

Hi,

I have a problem with displaying the .filename of an attachment in a form of
my Access 2007 database. In my database I have 2 attachments for each record
and I what to display the images and file names of these attachments (small
..jpg images) in my form. To achieve this I have placed the
attachment.FileData and the attachment.FileName on the form. The display of
image and file name work just fine. However, if I perform a sort on one of
the fields in the database the file names of the attached files are no longer
displayed, but instead '#Name?' is displayed for each file name. The image
(=FileData) is displayed normally. If I choose 'Clear all sorts' the display
of the file names is restored. What did I do wrong?

I would appreciate any help in this matter.

Leo
 
On Sun, 26 Apr 2009 04:50:01 -0700, No display of attachment.FileName

Write one line of code in the AttachmentCurrent event of the
Attachment control:
Me.myFileNameControl.Requery
(of course replace myObjectNames with yours)

-Tom.
Microsoft Access MVP
 
Back
Top