Unanswered: Access Not Transferring Date to Word
I am having a problem with a particular machine, and no other in my Access Database.
In my form, it takes fields and creates a report that then gets exported to a Word doc with the results from that. It saves this file on a network drive and functions normally for all other machines. The code passed is as followed for the date field on the doc;
What this does, is grab all the info it needs and creates one document TTT if it's of a certain status and TTT and TTV reports if it is of status 7. But both reports generated by this one specific machine has a ?Name as the result in the date field. The date is correct on this machine, and it seems to be machine specific and not user specific.
Dim lnRecordID As Long
Dim sql As String
Dim rcd As ADODB.Recordset
Set rcd = New ADODB.Recordset
Dim bolPrintTTT As Boolean
Me.txtPrintedDate = Now()
stDocName = "rptTTT"
' open the report 1st time to print it out to default printer
bolPrintTTV = IIf(Me.txtTTTOption = 7, True, False)
sql = "insert into tblTTTLookup (LOT_NUMBER, MATERIAL_NUMBER, CUSTOMER_VENDOR_ID, ORDER_NUMBER, PRINTED_DATE, USER_ID, TTV_EXIST) "
sql = sql & " VALUES ('" & Me.txtLotNumber & "', '" & Me.txtProductNo & "', '" & Me.txtCustomerNo
sql = sql & "', '" & Nz(Me.txtDeliveryNote, " ") & "', #" & Me.txtPrintedDate & "#, '" & txtUserName & "'," & bolPrintTTV & ")"
sql = "SELECT @@IDENTITY AS LastRecordId"
rcd.Open sql, CurrentProject.Connection, Options:=adCmdText
lnRecordID = rcd!Lastrecordid
'open report again to print to word
Set pf = New clsPrintToFit
DoCmd.OpenReport stDocName, acViewPreview
pf.ShowFileDialog = False
pf.SaveFileName = strMainDocPath & lnRecordID & ".doc"
pf.LoadMSWord = False
Set pf = Nothing
Any idea what is causing this? I had this happen with another machine and just ghosted it with our standard image which corrected the problem... but I don't want to do this if I can figure out what is causing it in the first place. The user can create a regular word doc and F5 to paste the Now() date in just fine.
"Passion rebuilds the world for the youth. It makes all things alive and significant. ~Ralph Waldo Emerson