Bobbinbobwhite
Registered User.
- Local time
- Today, 14:16
- Joined
- Jan 24, 2017
- Messages
- 17
Not an expert at either or Access or VBA, but attempting to learn as I go...
I am using the Albert Kallal Word Mail Merge code and have gotten stuck. I am using a stored/saved query to open the form. The recordset that query creates is the one I need to use for the mail merge "ALL" records. I have been unsuccessful in replacing the strSQL with my stored query or defining the current record set to use instead of a strSQL. I have been searching on this site and other locations for a few days and been unable to figure it out on my own. Any links to existing posts or guidance would be greatly appreciated.
**Solution was to create a temp table and use that in the select statement below**
Private Sub cmdMergeAll_Click()
Me.Refresh
MergeAllWord ("select * from Contacts")
Note that you can use a condition in the above sql
End Sub
Which calls:
Public Function MergeAllWord(strSQL As String, _
Optional strDir As String = "Word", _
Optional bolFullPath As Boolean = False, _
Optional strOutPutDoc As String, _
Optional bolShowDelete As Boolean = True)
Original code link:
http://www.kallal.ca/msaccess/msaccess.html
I am using the Albert Kallal Word Mail Merge code and have gotten stuck. I am using a stored/saved query to open the form. The recordset that query creates is the one I need to use for the mail merge "ALL" records. I have been unsuccessful in replacing the strSQL with my stored query or defining the current record set to use instead of a strSQL. I have been searching on this site and other locations for a few days and been unable to figure it out on my own. Any links to existing posts or guidance would be greatly appreciated.
**Solution was to create a temp table and use that in the select statement below**
Private Sub cmdMergeAll_Click()
Me.Refresh
MergeAllWord ("select * from Contacts")
Note that you can use a condition in the above sql
End Sub
Which calls:
Public Function MergeAllWord(strSQL As String, _
Optional strDir As String = "Word", _
Optional bolFullPath As Boolean = False, _
Optional strOutPutDoc As String, _
Optional bolShowDelete As Boolean = True)
Original code link:
http://www.kallal.ca/msaccess/msaccess.html
Last edited: