VBA to open mail merge based on results in a filtered form (1 Viewer)

mounty76

Registered User.
Local time
Today, 04:16
Joined
Sep 14, 2017
Messages
341
Hello!!

I have a query which is displayed in a form, next to each result is a button that opens another form which is filtered to that specific record.

I'd like to make a button with VBA code so that it opens up a mail merge document with only that filtered data in.....any help much appreciated! Currently it is showing all the records in the query it is attached to. I was thinking it would be best to append the filtered data into a 'temp query' in which the mail merge can use....if anyone knows the best way forward that would be great.
 

conception_native_0123

Well-known member
Local time
Today, 06:16
Joined
Mar 13, 2021
Messages
1,826
maybe the attached file can help you get started...
 

Attachments

  • Run Mail Merge from VBA.zip
    25.8 KB · Views: 246

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:16
Joined
May 7, 2009
Messages
19,175
you can create a Report.
then Open the Report on "filtered" list.
 

mounty76

Registered User.
Local time
Today, 04:16
Joined
Sep 14, 2017
Messages
341
Thanks for this, is there a way to import a word document into an access report
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 19:16
Joined
May 7, 2009
Messages
19,175
you can make an image from your word doc.
make the image as background image of the
report.
 

Users who are viewing this thread

Top Bottom