Access Manage Attachments linked to a SubForm

Joined
Jul 7, 2017
Messages
1
Reaction score
0
Hi.

I'm basically new with Microsoft access, especially with handling codes. I'm currently stuck now with figuring out how to link my command button to a SubForm. Any ideas how I can get it to work?

End Goal: Clicking the Manage Attachment Button opens the ManageAttachments Command to enable users to edit the attachments on the Form itself.

The Table Source for all this contains information about names and number of our contacts. So the Main form is suppose to look like this:
upload_2017-7-7_14-18-13.webp


The SubForm is a continuous form that is designed so that it shows all attachments saved per specific ID.

upload_2017-7-7_14-18-28.webp


This is the VBA Code I'm working on to invoke the Manage Attachments command whereas
ManAtt = Manage Attachments Button
SbFrmAttach = Sub Form
Attachments = Attachment file type on the left side of the form

The VBA Code Goes Like this:

Private Sub ManAtt_Click()
With Me.SbFrmAttach
.SetFocus
.Form!Attachments.SetFocus
RunCommand acCmdManageAttachments

End With
End Sub

Again, I'm fairly new with using Access and VBA so please have patience with me.
 

Attachments

  • upload_2017-7-7_14-17-30.webp
    upload_2017-7-7_14-17-30.webp
    41.4 KB · Views: 179
Back
Top