By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,490 Members | 862 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,490 IT Pros & Developers. It's quick & easy.

Using MonthName Function In MS Word Mail Merge From Access

P: n/a
I have single integers representing a month (i.e. 2) and need to
convert this to (March 1, 2007). So "2" represents really the end of
the previous month. I'm using MonthName and adding 1 in my query and
this is working fine. (Ex/ MonthName([varname]+1)&" 1, 2007).

Issue is I'm then using a MS Word Mail Merge to look at this query and
pull in the date. Word doesn't seem to like the MonthName function so
won't even display the query when I browse through the DB from Word.
If I remove the MonthName function, Word sees the query and connects.
So I'm trying to see if anyone is aware of this issue and what I might
do or if there's another function that will accomodate what I'm trying
to do above that Word might recognize.

Actually, the function I have is hardcoding the "1" and year which
isn't the best option either so if someone can suggest a better
approach, great. But it would also have to know that "12" is really
(Jan 1, 2008) or of the following year, etc.

We are using Access 2003 (though DB is in 2000), and Word 2003.

Feb 6 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,
Give this a try Format(DateAdd('m',1,varname & "/1/" &
year(date())),"mmmm dd"" ,""yyyy")
I wish I knew more about what the connection type that word uses, but
format and dateadd are pretty ubiquitous so they may work.
P

Feb 6 '07 #2

P: n/a
On Feb 6, 1:20 pm, "Pachydermitis" <praesa...@gmail.comwrote:
Hi,
Give this a try Format(DateAdd('m',1,varname & "/1/" &
year(date())),"mmmm dd"" ,""yyyy")
I wish I knew more about what the connection type that word uses, but
format and dateadd are pretty ubiquitous so they may work.
P
Looks like this is working! Thanks for the help!

Feb 7 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.