I have a form where I merge a date from Access to word. I want the dates to be : Thursday 17,July, 2003
which works but if I have a date Tuesday 1, July, 2003
I get Tuesday 7, January, 2003. I have checked the table Iam extracting the date from and it is in the format that I want. So I am assuming that the problem is in the export/code.
Here is my code:
----------------------------------------------
Dim objword As New Word.Application
Dim objdoc As Word.Document
DoCmd.OpenQuery "qrxDelcarriersurveydates"
DoCmd.OpenQuery "qrxAddcarriersurveydates"
objword.Application.Visible = True
Set objdoc = objword.Documents.open("C:\carrier survey dates.dot"
objword.Visible = True
objdoc.MailMerge.OpenDataSource Name:="c:\Implementation database Master.mdb",_ LinkToSource:=True, passworddocument:="",_ writepassworddocument:="",_
writepasswordtemplate:="", Revert:=False,_ Connection:="TABLE carriersurveydates",_ SQLStatement:="Select * FROM_ [carriersurveydates]", openexclusive:=False
objdoc.MailMerge.Execute
------------------------------------------------
Thank you in advance
--------------------
Some people make things happen, some watch while things happen, and some wonder 'What happened?'
which works but if I have a date Tuesday 1, July, 2003
I get Tuesday 7, January, 2003. I have checked the table Iam extracting the date from and it is in the format that I want. So I am assuming that the problem is in the export/code.
Here is my code:
----------------------------------------------
Dim objword As New Word.Application
Dim objdoc As Word.Document
DoCmd.OpenQuery "qrxDelcarriersurveydates"
DoCmd.OpenQuery "qrxAddcarriersurveydates"
objword.Application.Visible = True
Set objdoc = objword.Documents.open("C:\carrier survey dates.dot"
objword.Visible = True
objdoc.MailMerge.OpenDataSource Name:="c:\Implementation database Master.mdb",_ LinkToSource:=True, passworddocument:="",_ writepassworddocument:="",_
writepasswordtemplate:="", Revert:=False,_ Connection:="TABLE carriersurveydates",_ SQLStatement:="Select * FROM_ [carriersurveydates]", openexclusive:=False
objdoc.MailMerge.Execute
------------------------------------------------
Thank you in advance
--------------------
Some people make things happen, some watch while things happen, and some wonder 'What happened?'