Conditional Mail Merging

faizulhu

Registered User.
Local time
Today, 16:33
Joined
Oct 30, 2006
Messages
15
My problem is related with mail merging and I cannot use any third party software or plug-ins.

My database has a query named “Borrow Details Query”. This query has the 2 following fields: Issue Date & Return date.

I want to do is that if the difference in days between the Issue Date and Current Date is 10 days or greater, then it will create a mail merge for that particular record (names and address are inside the record). I want to add this function to a button on the switchboard.

So can anyone help me with providing me with the VB codes for that purpose? I am a novice and so please elaborate the solution.
 
This should be quite easy
get qry up add the table with the info in it
add the two date fields in two sepearte columns(one your date field the other current date or ()Now on the third column have 1 minus the other issue date - current date this will give you a number if you run it
now in the critia put > 10 or whatever
this will filter this out to greater than 10 you might want to play with this in case it does not show 10 so equals to or greater than 10 or easier >9.9
now you have this do what you want with it
then have a filter on the return date is null or soemthing like that
 
But how do you run a mail merge by a command button. And isn't there any alternative way rather can creating a query.
 
Does it have to be a merge - or would a access report be suitable
there are ways of doing this in word with coding but that is slightly more complicated than I know how to do

I would do something along the following do a merge based on qry
then have a hyperlink to the word doc and push a merge button on the word menu and this might work - there are better people out there for more complcated VB coding to do this
i would keep it as simple as possible
the above method i have used on a single record to do docs that are off the standard set that I use within my D/base - (I try to use the reports within Access as they are quite good and you can get them to do some weird and wonderful stuff without having to dive to deeply in to VB coding)
however their are times when you do need Word.doc and if you hunt around their are sample codings out their - but these do get pretty deep and complicated
 

Users who are viewing this thread

Back
Top Bottom