S
ScottA
I've got a form that lets the user filter a table full of
records (contacts: name, address, location, bla bla) by
selecting from values in six different fields - and am
using the selections from these combo boxes as the
parameters for the underlying query. Each time the user
changes the variables, they can re-query and update the
list. (that whole thing works just peachy)
Once the user has limited (filtered) the list to the
contacts they want, I would them to be able to click a
button and send the filtered list to Word and start a mail
merge.
I've got some really great code (courtesy of Albert
Kallal) that lets you set up just that - a button that
starts a mail merge operation based on the records in the
underlying query.
My problem is that by the time you're out there running
all these other subroutines, the focus is away from the
form where all of the parameters is stored, and I get
prompted to re-enter the parameters (enter value for
cboXYZ, and so on).
The code I'm working with passes the SQL when calling the
function that creates the mail merge -
Private Sub cmdMergeAll_Click()
Me.Refresh
MergeAllWord ("select * from " & Me.RecordSource)
Is it possible to grab the selected parameters from the
form and pass them along to the function as well? Is
there another way to do this?
Thanks!
Scott A
records (contacts: name, address, location, bla bla) by
selecting from values in six different fields - and am
using the selections from these combo boxes as the
parameters for the underlying query. Each time the user
changes the variables, they can re-query and update the
list. (that whole thing works just peachy)
Once the user has limited (filtered) the list to the
contacts they want, I would them to be able to click a
button and send the filtered list to Word and start a mail
merge.
I've got some really great code (courtesy of Albert
Kallal) that lets you set up just that - a button that
starts a mail merge operation based on the records in the
underlying query.
My problem is that by the time you're out there running
all these other subroutines, the focus is away from the
form where all of the parameters is stored, and I get
prompted to re-enter the parameters (enter value for
cboXYZ, and so on).
The code I'm working with passes the SQL when calling the
function that creates the mail merge -
Private Sub cmdMergeAll_Click()
Me.Refresh
MergeAllWord ("select * from " & Me.RecordSource)
Is it possible to grab the selected parameters from the
form and pass them along to the function as well? Is
there another way to do this?
Thanks!
Scott A