A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Attachment control - How to use?



 
 
Thread Tools Display Modes
  #1  
Old April 30th, 2010, 03:41 PM posted to microsoft.public.access
SK
external usenet poster
 
Posts: 88
Default Attachment control - How to use?

I am trying to figure out how to use the Attachment control on a form. On
the form, I have a listbox for the user to select a specific record. When an
item is selected, I use Set rst = CurrentDb.OpenRecordset(sql) to open the
record. I then populate the controls on the form with the following
formname.controlname.value=rst!field

I can't figure out how to load the Attachments into the Attachment control.
I tried searching here and online and did not find much outside of using a
bound control. I do not want to use a bound control/form if I can avoid it.

any help or code would be greatly appreciated.

  #2  
Old May 1st, 2010, 03:57 PM posted to microsoft.public.access
Mark Andrews[_4_]
external usenet poster
 
Posts: 169
Default Attachment control - How to use?

I'm not sure why you don't want to use a bound form but I guess you could
extract the file(s) from the attachment
field in the underlying recordset and save them to your hard drive and then
load them into the unbound attachments control.

There are code examples out there, here’s a few:
http://msdn.microsoft.com/en-us/library/bb258184.aspx
http://www.dbforums.com/microsoft-ac...m-problem.html

If you can't figure it out send me an email and I'll find you the code
needed,
I usually do things the other way, extract files from a bound attachment
field
and save them in the file system so I can use them in email or something
else.

I don't think I ever used an unbound attachments control?
Not sure if there is a way to just assign (without saving to disk and
reading from disk)?
I just never did this so not sure.

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com

"sk" wrote in message
...
I am trying to figure out how to use the Attachment control on a form. On
the form, I have a listbox for the user to select a specific record. When
an
item is selected, I use Set rst = CurrentDb.OpenRecordset(sql) to open the
record. I then populate the controls on the form with the following
formname.controlname.value=rst!field

I can't figure out how to load the Attachments into the Attachment
control.
I tried searching here and online and did not find much outside of using a
bound control. I do not want to use a bound control/form if I can avoid
it.

any help or code would be greatly appreciated.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.