Question : DoCmd.TransferDatabase to DBase III - how

Can anyone tell me what is wrong with the following code. When I run it from I get a message to say that
"C:\Documents and Settings\Rob\My Documents\MyDatabase.accdb is not a valid path.  Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides." If I run it manually it works fine.

DoCmd.TransferDatabase acExport, "dBase III" _
      , CurrentDb.Name, _
      acTable, _
      "tblTempOutput", _
      "C:\Documents and Settings\Rob\My Documents\Out.dbf"

Answer : DoCmd.TransferDatabase to DBase III - how

I tried another web site and found the solution, which implies the help is wrong. When I changed the code to the following it worked perfectly.

DoCmd.TransferDatabase acExport, "dBase III", "C:\",, "tblTempOutput", "Out.dbf"

Random Solutions  
 
programming4us programming4us