D
Debbie
Well, it depends on how the date is formatted in your
table. My format is usually __/__/__, so the criteria
will show up in the SQL statement as follows:
((yourdatefield)="1/1/04")
If it's as text and believe me I've seen it done, you
would need to make sure that how you type it is exactly
how it is in the database. In order to get a parameter
value window open to choose what dates you want I usually
just put [Date] or Between [StartDate] and [End Date] in
the criteria field.
If you are worried about how your date will look in your
merge fields once merged into Word, here's a tip.
{MERGEFIELD YOURDATEFIELD \@ "MMMM d, yyyy"}
How to add this formatting to your Word Doc, hit Alt + F9.
table. My format is usually __/__/__, so the criteria
will show up in the SQL statement as follows:
((yourdatefield)="1/1/04")
If it's as text and believe me I've seen it done, you
would need to make sure that how you type it is exactly
how it is in the database. In order to get a parameter
value window open to choose what dates you want I usually
just put [Date] or Between [StartDate] and [End Date] in
the criteria field.
If you are worried about how your date will look in your
merge fields once merged into Word, here's a tip.
{MERGEFIELD YOURDATEFIELD \@ "MMMM d, yyyy"}
How to add this formatting to your Word Doc, hit Alt + F9.
dbo.WelcomeLetterMailMerge_V WHERE-----Original Message-----
Hi,
I'm using the following code to perform a mail merge from an Access project:
With docMailMergeSource.MailMerge
..MainDocumentType = wdFormLetters
..OpenDataSource Name:=<datasource path>, _
Format:=wdOpenFormatAuto, ReadOnly:=True, LinkToSource:=False, _
ConfirmConversions:=False, _
SQLStatement:="SELECT * FROM
;PWD=;APP=Microsoft Data Access Components"AgreementDate >= 'Sep 1, 2001'", _
Connection:="DRIVER=SQLServer;SERVER=SOMESVR;UID=developer