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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|