Using the results of a filter by selection in mailmerge

  • Thread starter Thread starter Toobi-Won Kenobi
  • Start date Start date
T

Toobi-Won Kenobi

I am using an Access 2003 db and filtering the records by selection. This
provides the result I am looking for.
The field I am searching can contain several code numbers, separated by
commas.
I just select one of the code numbers and filter on that, I cannot search on
field name alone in this instance.
What I then need to do is use the results of this find to either print out
labels or envelopes in a mailmerge.
Is this the way to do it, or is there a better way?
Previous to using Access I was doing this in Excel and using the search
result to create a new sheet, which I then used in the mailmerge.
Any help with this most gratefully received.
TWK
 
Your data scheme is wrong. By the Relational Rules, a field must be
"atomic" irrespective of what Microsoft may do to lure newbies with
dysfunctional tricks. Visit www.mvps.org/access and read the "10
Commandments".

Re-design your tables so that you have a related/child table which has
a record for each of the values in that multivalued field. Once that
is done you should have no trouble creating a query for your merge or
print run.


HTH
 
Larry Daugherty said:
Your data scheme is wrong. By the Relational Rules, a field must be
"atomic" irrespective of what Microsoft may do to lure newbies with
dysfunctional tricks. Visit www.mvps.org/access and read the "10
Commandments".

Re-design your tables so that you have a related/child table which has
a record for each of the values in that multivalued field. Once that
is done you should have no trouble creating a query for your merge or
print run.


HTH
--
Larry-

Many thnks for your speedy reply.

Atomic??
Commandment 1?
Oh, I see I am really going to enjoy working with Access :)
Are you saying that each code number must have its own field? (I inherited
the Db)
What about an address field that contains "XXXXXX St." , "YYYYY Ave"or
"ZZZZZZ Rd" and filtering on the suffix? (just an example, can't think why
one would want to)

Regards
TWK
 
If your form is filtered, then try my word merge...it should work.

Go:

dim strSql as string

strSql = "select * from tableName where " & me.Filter

MergeAllWord

the above 3 lines of code should do the trick for you...

The sample I have can be found here:
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

What is nice/interesting about my sample is that is specially designed to
enable ANY form with ONE LINE of code....

Thus, each time you build a new form, you can word merge enable it with
great ease.

Make sure you read the instructions from above, and you should eventually
get to the follwoing page
http://www.members.shaw.ca/AlbertKallal/wordmerge/page2.html


Note that the merge can also use a query, and thus you don't have to merge
just "one" record..
 
Albert D. Kallal said:
If your form is filtered, then try my word merge...it should work.

Go:

dim strSql as string

strSql = "select * from tableName where " & me.Filter

MergeAllWord

the above 3 lines of code should do the trick for you...

The sample I have can be found here:
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

What is nice/interesting about my sample is that is specially designed to
enable ANY form with ONE LINE of code....

Thus, each time you build a new form, you can word merge enable it with
great ease.

Make sure you read the instructions from above, and you should eventually
get to the follwoing page
http://www.members.shaw.ca/AlbertKallal/wordmerge/page2.html


Note that the merge can also use a query, and thus you don't have to merge
just "one" record..

Hello Albert,

Many thanks for your reply.
I am not unfamiliar with VBA through using it macros in Excel and will have
a read ofhow to apply it.
I like your "Thus, each time you build a new form, you can word merge enable
it with
great ease"
Believe me, we have different definitions of the phrase, "great ease" ;)
I just cannot believe that something as featured Access does not allow the
saving of filtered searches in such a way as to be used in a MM.
What I did after posting yesterday was to copy all the found records from
the FbyS and paste appended them into a new Db and ran the Report >Label
merge from there.
Not ideal, but it worked.
Regards

TWK
 
Back
Top