JoanneJames
Registered User.
- Local time
- Today, 16:57
- Joined
- Feb 19, 2008
- Messages
- 59
Could someone please help me with this problem?
I have the following stmt:
DoCmd.TransferText acExportMerge, , SelectedQuery, DataDocFileName, True. Whenever I run it, I get an error msg that the Access engine could not find the DataDocFileName. I've checked it and know it is correct. In addition, the file gets deleted, even though it is there just before I run the TransferText. Also, it was actually running fine before. The only thing I changed was the data that went into the file - so I made sure the fields and number of them matched with what I was trying to put into the file. Also, the documentation on TransferText says that if it can't find a file it will re-create it, which it is not doing either.
The one thing which I have no control over, is that I am now testing under terminal services (used to do this in Citrix). However, like I mentioned, it WAS working at first (under terminal services), but now isn't. Anyone have ideas? I really need some help on this one!
Here's whats in the file:
"letterid" "patientid" "PtName" "MDLast" "Letterdate" "ActionDate" "RecipientName1" "Address1" "Address2" "AddressRoomNumb" "AddressLocation" "AddressLocMod"
748 24052 "TestName" "Makkar" 11/12/2009 0:00:00 11/12/2009 0:00:00 "Makkar" "TestAddress1" "TestAddress2" "342" "HH"
Here's the query that generates the data to go into the file:
SELECT Userletter.patientid, Userletter.Letterdate, Userletter.RecipientName1, Userletter.Address1, Userletter.Address2, Userletter.PtName, Userletter.MDLast, Userletter.ActionDate, Userletter.AddressLocation, IIf(nz([AddressLocation]) Not In ('H House',' '),'the ' & [AddressLocation],[AddressLocation]) AS AddressLocMod
FROM Userletter
WHERE (((Userletter.letterid) In (790)));

DoCmd.TransferText acExportMerge, , SelectedQuery, DataDocFileName, True. Whenever I run it, I get an error msg that the Access engine could not find the DataDocFileName. I've checked it and know it is correct. In addition, the file gets deleted, even though it is there just before I run the TransferText. Also, it was actually running fine before. The only thing I changed was the data that went into the file - so I made sure the fields and number of them matched with what I was trying to put into the file. Also, the documentation on TransferText says that if it can't find a file it will re-create it, which it is not doing either.
The one thing which I have no control over, is that I am now testing under terminal services (used to do this in Citrix). However, like I mentioned, it WAS working at first (under terminal services), but now isn't. Anyone have ideas? I really need some help on this one!
Here's whats in the file:
"letterid" "patientid" "PtName" "MDLast" "Letterdate" "ActionDate" "RecipientName1" "Address1" "Address2" "AddressRoomNumb" "AddressLocation" "AddressLocMod"
748 24052 "TestName" "Makkar" 11/12/2009 0:00:00 11/12/2009 0:00:00 "Makkar" "TestAddress1" "TestAddress2" "342" "HH"
Here's the query that generates the data to go into the file:
SELECT Userletter.patientid, Userletter.Letterdate, Userletter.RecipientName1, Userletter.Address1, Userletter.Address2, Userletter.PtName, Userletter.MDLast, Userletter.ActionDate, Userletter.AddressLocation, IIf(nz([AddressLocation]) Not In ('H House',' '),'the ' & [AddressLocation],[AddressLocation]) AS AddressLocMod
FROM Userletter
WHERE (((Userletter.letterid) In (790)));