Albert Kallal Mail Merge Code

G

Guest

Hi, I have a filter applied to a form which displays records between a date
range entered by the user in unbound fields on the form. Is it possible to
use this data to perform a mail merge?
Thanks
Sue
 
G

Guest

Also, just using the data from the forms recordset is not sufficient as there
are several combo boxes which actually store a numeric identifier eg the
specialist field for example contains a numeric value to identify the person
and I would need the person's name to be transferred to word. Can the name of
a query maybe be used as the recordsource?
 
G

Guest

I have a query with all the relevant data but how do I use this with Albert's
code? I tried
MergeAllWord ("select * from [qry Itinerary_Crosstab Planner]")
but this does not work. Sorry, could you give me a bit of help with this...
novice at VB or sql and tried looking in help and searching newsgroup but
didn't come up with anything.

Thanks
 
A

Albert D.Kallal

hughess7 said:
I have a query with all the relevant data but how do I use this with
Albert's
code? I tried
MergeAllWord ("select * from [qry Itinerary_Crosstab Planner]")

Hum, the above looks ok.. Try placing the above in a new blank query.

ie:
make a new query, and switch to sql view, then type in:

select * from [qry Itinerary_Crosstab Planner]

Does the above sql work when you place it in a new query?
 
G

Guest

Hi, yes it works in a new SQL specific, data-definition query. I tried a
different query name and this worked ok. I wander if it is because its a
crosstab query? It just produces the 'No data for this merge' error but sql
statement looks ok.

Is there a way to not force a page break too between the records?

Thanks, Sue

Albert D.Kallal said:
hughess7 said:
I have a query with all the relevant data but how do I use this with
Albert's
code? I tried
MergeAllWord ("select * from [qry Itinerary_Crosstab Planner]")

Hum, the above looks ok.. Try placing the above in a new blank query.

ie:
make a new query, and switch to sql view, then type in:

select * from [qry Itinerary_Crosstab Planner]

Does the above sql work when you place it in a new query?


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.members.shaw.ca/AlbertKallal
 
A

Albert D.Kallal

hughess7 said:
Hi, yes it works in a new SQL specific, data-definition query. I tried a
different query name and this worked ok.

Hum, perhaps you might try using the above new query name.

MergeAllWord "YouNewquerynameGoesHere"

If that query just runs clean from the query builder, then the above should
work.
Is there a way to not force a page break too between the records?

I believe that the standard word merge in ms-word goes one whole document
template for EACH record, and thus you get a page break. This behavior of
word has nothing to do with my software.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top