Code for using a command button to add an attachment

wheatlandacctech

New member
Local time
Today, 08:23
Joined
May 21, 2022
Messages
8
Hello,

I won't cross post this time. I'm trying to use a command button instead of having to double click on the attachment field to open the add attachment window. Is there a way to do this with a command button? I hope my question makes sense. I did a search of this forum and also google searched it but couldn't find an answer.

Thanks,

Joel
 
hi @wheatlandacctech

You can launch the dialog box to manage attachments like this:

Rich (BB code):
   Me.Attachment_controlName.SetFocus
   DoCmd.RunCommand acCmdManageAttachments

where
Attachment_controlName is the Name property of the attachment control
 
Last edited:

Users who are viewing this thread

Back
Top Bottom