Hello. I'm working on code that exports an Access table as a .dbf file. I keep getting an error 3044 claiming the path of the databasename is wrong. Here's the code:
DoCmd.TransferDatabase transfertype:=acExport, databasetype:="dbase 5.0", _
objecttype:=acTable, Source:="qc2rptma", _
I tried variations of the path but they all fail. I even used Application.CurrentProject.FullName and that didn't work either. I did a search on dbforums and someone else had the same problem 4 years ago but no one answered her question. Anybody have any ideas? TIA.
I tried a couple of other database types and they didn't work but when I went back to the help screen again I noticed that they want the name of the database you're exporting to. Dbase and Paradox and others don't have databases like Access does. All the files are in a folder. I created a folder and called that the database name but that didn't work either.
Okay, I figured it out. When I tried to export the table through the menu buttons, I received a "Cannot name a field twice" error. So I created a query and added the fields one at a time till I found out which fields were triggering the error. I renamed those fields, changed the command to export an acQuery, and it worked. dBase uses a limited number of characters in each field name and doesn't allow spaces. So thanks, guys.