Super Easy Word Merge

N

Nikki

Hi,

I have used the advice and examples from the website including data on
"Super Easy Word Merge"
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Everything works fine except...

The data I want to merge is in a subform. When I use the merge function it
keeps trying to merge my main form even though I have the command button
located on my subform.
If I open the subform separately it works fine but when I want to do it all
from the main form it doesn't work.

Does anyone know if there is a section of the code that I need to change to
point it to the correct table?
 
P

Pieter Wijnen

haven't used it but..
exchange

Set frmF = Screen.ActiveForm
for
Set frmF = Screen.ActiveForm.[NameOfSubFormControl].Form
in the code

I'm sure dr Kallal will ammend the code for this eventuality <g>

Pieter
 
P

Pieter Wijnen

haven't used it but..
exchange

Set frmF = Screen.ActiveForm
for
Set frmF = Screen.ActiveForm.[NameOfSubFormControl].Form
in the code

I'm sure dr Kallal will ammend the code for this eventuality <g>

Pieter

Nikki said:
Hi,

I have used the advice and examples from the website including data on
"Super Easy Word Merge"
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Everything works fine except...

The data I want to merge is in a subform. When I use the merge function
it
keeps trying to merge my main form even though I have the command button
located on my subform.
If I open the subform separately it works fine but when I want to do it
all
from the main form it doesn't work.

Does anyone know if there is a section of the code that I need to change
to
point it to the correct table?



--
 
N

Nikki

Perfect!
Thanks!

Pieter Wijnen said:
haven't used it but..
exchange

Set frmF = Screen.ActiveForm
for
Set frmF = Screen.ActiveForm.[NameOfSubFormControl].Form
in the code

I'm sure dr Kallal will ammend the code for this eventuality <g>

Pieter

Nikki said:
Hi,

I have used the advice and examples from the website including data on
"Super Easy Word Merge"
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Everything works fine except...

The data I want to merge is in a subform. When I use the merge function
it
keeps trying to merge my main form even though I have the command button
located on my subform.
If I open the subform separately it works fine but when I want to do it
all
from the main form it doesn't work.

Does anyone know if there is a section of the code that I need to change
to
point it to the correct table?
 
P

Pieter Wijnen

de nada

Nikki said:
Perfect!
Thanks!

Pieter Wijnen said:
haven't used it but..
exchange

Set frmF = Screen.ActiveForm
for
Set frmF = Screen.ActiveForm.[NameOfSubFormControl].Form
in the code

I'm sure dr Kallal will ammend the code for this eventuality <g>

Pieter

Nikki said:
Hi,

I have used the advice and examples from the website including data on
"Super Easy Word Merge"
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Everything works fine except...

The data I want to merge is in a subform. When I use the merge
function
it
keeps trying to merge my main form even though I have the command
button
located on my subform.
If I open the subform separately it works fine but when I want to do it
all
from the main form it doesn't work.

Does anyone know if there is a section of the code that I need to
change
to
point it to the correct table?
 
P

Pieter Wijnen

de nada

Nikki said:
Perfect!
Thanks!

Pieter Wijnen said:
haven't used it but..
exchange

Set frmF = Screen.ActiveForm
for
Set frmF = Screen.ActiveForm.[NameOfSubFormControl].Form
in the code

I'm sure dr Kallal will ammend the code for this eventuality <g>

Pieter

Nikki said:
Hi,

I have used the advice and examples from the website including data on
"Super Easy Word Merge"
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Everything works fine except...

The data I want to merge is in a subform. When I use the merge
function
it
keeps trying to merge my main form even though I have the command
button
located on my subform.
If I open the subform separately it works fine but when I want to do it
all
from the main form it doesn't work.

Does anyone know if there is a section of the code that I need to
change
to
point it to the correct table?



--
 
N

Nikki

Any chance you know how to delete a template after one has been added to the
word template form?

Pieter Wijnen said:
haven't used it but..
exchange

Set frmF = Screen.ActiveForm
for
Set frmF = Screen.ActiveForm.[NameOfSubFormControl].Form
in the code

I'm sure dr Kallal will ammend the code for this eventuality <g>

Pieter

Nikki said:
Hi,

I have used the advice and examples from the website including data on
"Super Easy Word Merge"
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Everything works fine except...

The data I want to merge is in a subform. When I use the merge function
it
keeps trying to merge my main form even though I have the command button
located on my subform.
If I open the subform separately it works fine but when I want to do it
all
from the main form it doesn't work.

Does anyone know if there is a section of the code that I need to change
to
point it to the correct table?
 
P

Pieter Wijnen

Nope
Will if I look through the code though <g>

Pieter

Nikki said:
Any chance you know how to delete a template after one has been added to
the
word template form?

Pieter Wijnen said:
haven't used it but..
exchange

Set frmF = Screen.ActiveForm
for
Set frmF = Screen.ActiveForm.[NameOfSubFormControl].Form
in the code

I'm sure dr Kallal will ammend the code for this eventuality <g>

Pieter

Nikki said:
Hi,

I have used the advice and examples from the website including data on
"Super Easy Word Merge"
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Everything works fine except...

The data I want to merge is in a subform. When I use the merge
function
it
keeps trying to merge my main form even though I have the command
button
located on my subform.
If I open the subform separately it works fine but when I want to do it
all
from the main form it doesn't work.

Does anyone know if there is a section of the code that I need to
change
to
point it to the correct table?
 
P

Pieter Wijnen

Nope
Will if I look through the code though <g>

Pieter

Nikki said:
Any chance you know how to delete a template after one has been added to
the
word template form?

Pieter Wijnen said:
haven't used it but..
exchange

Set frmF = Screen.ActiveForm
for
Set frmF = Screen.ActiveForm.[NameOfSubFormControl].Form
in the code

I'm sure dr Kallal will ammend the code for this eventuality <g>

Pieter

Nikki said:
Hi,

I have used the advice and examples from the website including data on
"Super Easy Word Merge"
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Everything works fine except...

The data I want to merge is in a subform. When I use the merge
function
it
keeps trying to merge my main form even though I have the command
button
located on my subform.
If I open the subform separately it works fine but when I want to do it
all
from the main form it doesn't work.

Does anyone know if there is a section of the code that I need to
change
to
point it to the correct table?



--
 
A

Albert D.Kallal

Nikki said:
Any chance you know how to delete a template after one has been added to
the
word template form?

This comes up once in a while.....

Do you think users can handle a delete button? Would this cause them to
accident delete temples that they need?

(right now, to delete a template, you use the windows explore. Simply browse
to the folder where the application is (your mdb, or mde file), and then
look for a directory called word...you can then simply delete any template
you want....

So, what do you folks think....should I add a delete button?
 
A

Albert D.Kallal

The data I want to merge is in a subform. When I use the merge function
it
keeps trying to merge my main form even though I have the command button
located on my subform.
If I open the subform separately it works fine but when I want to do it
all
from the main form it doesn't work.

Does anyone know if there is a section of the code that I need to change
to
point it to the correct table?

Well, you REALLY don't wan tot change the code (you can, and I don't care if
you do!!!).

The reason why you don't want to change the code is then you can't use a
another form or have a another location in your application that does a
merge also, and in that case, you might not be using a sub-form. So....

How is the sub-form being filtered? The best solution is to simply pass the
merge routines the sql of your choice.

dim strSql as string

strSql = "select * from tblCustomers where city = 'Edmonton'"

You can also use the name of a query. So, how did you set the data source of
the sub-form?

To merge using the above sql of your choice (or query)...just go

MergeAllWord strSql

That is all you need (just make sure the sql has the same records, or
restriction that you have in the sub-form).

That way you don't have to modify the library code. (and, maintain it
either.....). If you use the merge code in 10 applications, and modify it
10 times, then you create a considerable amount of maintains work, not to
mention the difficulty of replacing code when I issue bug fixes....
 

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