B
Bill Dearborn
Please Help...
I have a problem which really has me going around in circles...so any hint
would be helpful. I am running Access XP on Windows XP Pro - but have
duplicated the error with Access 2000 on Windows XP Home and with Access
2000 on WIndows ME. The configuration is Frontend for forms, queries,
reports and modules, with all data in a seperate backend database - all
databases are in Access 2000 format..
I have a command for writing the results of a query to a Word Mail Merge
file.
The command is:
DoCmd.TransferText acExportMerge, , "qryALLMP", "C:\DATAFILES\ALLMP.txt"
The query is:
SELECT [strPersonLastName] & ", " & [strPersonFirstName] AS SortName,
tblDelegates.strPersonLastName, tblDelegates.strPersonFirstName,
tblDelegates.strPersonPopName, tblDelegates.strPersonAddress,
tblDelegates.strPersonCommunity, tlkpProvince.strProvAbrev,
tblDelegates.strPersonPCode, Format(Right([strWorkPhone],7),"!@@@-@@@@") AS
WPhone, strHomePhone], strFaxPhone, tblDelegates.strPersonEmail,
tblPresbyteries.strPresbyteryAbrev, tblPresbyteries.strPresbyteryName,
tblDelegates.strPersonGender, tblDelegates.ynInDirectory,
tblDelegates.strLayorMinPer
FROM tlkpProvince INNER JOIN (tblPresbyteries INNER JOIN tblDelegates ON
tblPresbyteries.idnPresbyteryID = tblDelegates.idnPresbyteriesID) ON
tlkpProvince.idnProvID = tblDelegates.idnPersonProvID
WHERE (((tblDelegates.strLayorMinPer)="Ministry Personnel"))
ORDER BY [strPersonLastName] & ", " & [strPersonFirstName];
This works fine. But the moment I attempt to add formatting to the
strHomePhone and strFaxPhone that is exactly the same as the formatting used
for strWorkPhone i.e Format(Right([strHomePhone],7),"!@@@-@@@@") AS HPhone)
I get an error message...
Run-time Error 3011: The Microsoft Jet database engine could no find the
object "ALLMP.txt". Make sure the object exists and that you spell its name
and the path correctly."
The moment I remove the formatting the command works again.
When I open the revised Query directly it runs perfectly, the error only
emerges with the DoCmd.TransferText command. The same error was occuring
previously when I attempted to implement the first format for the
strWorkPhone. WE suspected a corrupt database at the time and the error
corrected itself when I created it in a new copy of the database, linmk to
the data, pasted the SQL query statment into a new query and re-wrote the
module with the Do.Cmd.Transfertext command. Then imported all the other
forms, reports and modules - that got the first formatting to work. This
time any attempts to get the query to work from DoCmd.TransferText in a new
database do not work - at least four attempts.
I have recently upgraded the Jet Database program as recommended by
Microsoft - I only did this on one machine just in case, but this does not
appear to change anything.
Previously someone wondered if the names of the files or directories might
contain spaces or be too long and hence cause the Jet to issue the error
3011 - but I have checked this - and have two other commands functioning
perfectly with the same query on different tables writing to files in the
same directory - the only difference being the lack of formatting. When I
add formatting to the telephone numbers in those other Queries I get the
3011 Error until I remove the formatting then all is well again.
I have searched Google - most references to 3011 are either for specifics of
corrupt databases ... or my earlier questions when I had my first run at
this thing... I am now re-reading supplementary books on SQL wondering it I
had made an error there...
Any assistance will be greatly appreciated...
I have a problem which really has me going around in circles...so any hint
would be helpful. I am running Access XP on Windows XP Pro - but have
duplicated the error with Access 2000 on Windows XP Home and with Access
2000 on WIndows ME. The configuration is Frontend for forms, queries,
reports and modules, with all data in a seperate backend database - all
databases are in Access 2000 format..
I have a command for writing the results of a query to a Word Mail Merge
file.
The command is:
DoCmd.TransferText acExportMerge, , "qryALLMP", "C:\DATAFILES\ALLMP.txt"
The query is:
SELECT [strPersonLastName] & ", " & [strPersonFirstName] AS SortName,
tblDelegates.strPersonLastName, tblDelegates.strPersonFirstName,
tblDelegates.strPersonPopName, tblDelegates.strPersonAddress,
tblDelegates.strPersonCommunity, tlkpProvince.strProvAbrev,
tblDelegates.strPersonPCode, Format(Right([strWorkPhone],7),"!@@@-@@@@") AS
WPhone, strHomePhone], strFaxPhone, tblDelegates.strPersonEmail,
tblPresbyteries.strPresbyteryAbrev, tblPresbyteries.strPresbyteryName,
tblDelegates.strPersonGender, tblDelegates.ynInDirectory,
tblDelegates.strLayorMinPer
FROM tlkpProvince INNER JOIN (tblPresbyteries INNER JOIN tblDelegates ON
tblPresbyteries.idnPresbyteryID = tblDelegates.idnPresbyteriesID) ON
tlkpProvince.idnProvID = tblDelegates.idnPersonProvID
WHERE (((tblDelegates.strLayorMinPer)="Ministry Personnel"))
ORDER BY [strPersonLastName] & ", " & [strPersonFirstName];
This works fine. But the moment I attempt to add formatting to the
strHomePhone and strFaxPhone that is exactly the same as the formatting used
for strWorkPhone i.e Format(Right([strHomePhone],7),"!@@@-@@@@") AS HPhone)
I get an error message...
Run-time Error 3011: The Microsoft Jet database engine could no find the
object "ALLMP.txt". Make sure the object exists and that you spell its name
and the path correctly."
The moment I remove the formatting the command works again.
When I open the revised Query directly it runs perfectly, the error only
emerges with the DoCmd.TransferText command. The same error was occuring
previously when I attempted to implement the first format for the
strWorkPhone. WE suspected a corrupt database at the time and the error
corrected itself when I created it in a new copy of the database, linmk to
the data, pasted the SQL query statment into a new query and re-wrote the
module with the Do.Cmd.Transfertext command. Then imported all the other
forms, reports and modules - that got the first formatting to work. This
time any attempts to get the query to work from DoCmd.TransferText in a new
database do not work - at least four attempts.
I have recently upgraded the Jet Database program as recommended by
Microsoft - I only did this on one machine just in case, but this does not
appear to change anything.
Previously someone wondered if the names of the files or directories might
contain spaces or be too long and hence cause the Jet to issue the error
3011 - but I have checked this - and have two other commands functioning
perfectly with the same query on different tables writing to files in the
same directory - the only difference being the lack of formatting. When I
add formatting to the telephone numbers in those other Queries I get the
3011 Error until I remove the formatting then all is well again.
I have searched Google - most references to 3011 are either for specifics of
corrupt databases ... or my earlier questions when I had my first run at
this thing... I am now re-reading supplementary books on SQL wondering it I
had made an error there...
Any assistance will be greatly appreciated...