Merge to MS Word - code won't work

ritchiehicks

New member
Local time
Today, 23:39
Joined
Mar 3, 2008
Messages
6
Hi,

I wish to give my users the facility to merge a record's information to a pre-defined MS Word template. I have already seen code supplied by Albert Kallal here and tried to use it in my db but to no avail. I can get his test to work, but not in my db. I even contacted Albert directly who was unavailable to help me with the problem.

Has anyone else used this to sucess? I am really stuck now and this issue is holding me back. I really need some advice!! Perhaps someone could take a look at my db and see if they can fix it?

Thanks,
Ritchie. ;)
 
ok - I have had the same problem

solution is
the super easy word only works when
the form is based on 1 table - any lookups or linked tables and it goes tits up

solution ..
make a new table
with all of the merge fields you require
now when you open the form have a append qry fill this table with the correct info , and on the exit of the form have it delete the info

this works - took me ages to figure it out though - cos I am not the brightess button..

so I have

zzmailmergetbl
and 2 qrys
1 zzmailappend
2 zzmaildelete
 
OK so I think I understand what you mean.

Queries are new to me so what you are saying is:

set up a query which "exports" the data from the main table to a new table
Send an on enter event to run the query
Place the super word merge function in the "new" form for my "query" table.

Now I just need to learn how to set up the query!!
 
OK so I think I understand what you mean.

Queries are new to me so what you are saying is:

set up a query which "exports" the data from the main table to a new table
Send an on enter event to run the query
Place the super word merge function in the "new" form for my "query" table.

Now I just need to learn how to set up the query!!

this is so simple


I presume you can use qry's etc - it just a case of changeing the default qry type to append and pointing it at your table .

if you are at this stage i would recommend getting a couple of books - Access Bible - would be a halfway decent one - or even a simplier one - basic

qrys are at the root of Access - how to question your data, and to make reports -90 % of the time on a qry

table set ups are important - but questioning the data is really important ..
regards
 
Hi,

Thanks. I have set up my new form and table. I have also set up a query which makes a copy of the main data when run.

However, I don't know how to get the apend query to run on opening the new form where I intend to merge form. I presume I need an "onLoad" command but don't know how to add this. I also don't fully understand how to make the append open the form on the same record as the user was just on.

Could you help me, please?

Thanks,
Ritchie.
 
I have solved this.

I simply created a single page form with the merge button in it. I then set my tab paged form to open this single page with the data from the exisiting record simply using the wizard.

It works a treat. I have also contact Albert and asked him to explain in his pages that this merge application does not work in tabular forms.

Ritchie.
 

Users who are viewing this thread

Back
Top Bottom